发布

  • [OPIK-6890] [BE] feat: wire deletion-events bridge into traces delete paths (#7376)

    frostbyte_neo 发布于 2026-07-07 12:28:43 +00:00

    • [OPIK-6890] [BE] feat: wire deletion-events bridge into traces delete paths

    • fix(traces): inject whole OpikConfiguration to avoid @Config sub-config binding failure

    Injecting @Config DatabaseAnalyticsDataModelConfig directly fails at service
    startup with a Guice MissingConstructor error (guicey sub-config binding does not
    resolve the record; only reproduces on the real service, not integration tests).
    Inject @Config OpikConfiguration and read the flag via its getter, matching the
    proven pattern in DatasetItemService.

    • refactor(traces): model sourceTable as enum and chunk deletion-events insert

    Address PR review:

    • Introduce SourceTable enum (mirrors DeletionReason) instead of a String
      source_table, for type safety and read-back validation.
    • Chunk DeletionEventDAO.insert into sub-batches so the per-row bind
      count stays within the range the ClickHouse driver handles reliably;
    • fix(traces): validate deletionEventsInsertBatchSize bounds

    Constrain the config to @Min(1) @Max(2000) so a misconfigured zero/negative
    fails startup loudly instead of silently disabling capture (Lists.partition
    would throw and the best-effort path would swallow it), and cap it to keep the
    per-statement bind count in the safe range.

    下载附件