发布

  • [OPIK-6899] [BE] feat: apply benchmark-driven codec refinements to traces_local_v2 (#7492)

    frostbyte_neo 发布于 2026-07-17 08:19:51 +00:00

    • [OPIK-6899] [BE] feat: apply benchmark-driven codec refinements to traces_local_v2

    Add migration 000103 applying the six best-guess codec refinements the
    OPIK-6899 benchmark identified over the provisional 000101 codecs
    (metadata-only on the empty pre-cutover table):

    • end_time / last_updated_at: drop Delta (not monotonic in storage order;
      plain ZSTD(1) ~11% smaller)
    • visibility_mode / source / environment: server default -> ZSTD(1)
      (~2x smaller at equal decode)
    • output_keys: ZSTD(1) -> ZSTD(3) (structured text, ~16% smaller)

    Best guesses on a synthetic slice, to re-validate at the staging cutover;
    none is ever worse than the 000101 codec, so adopting now is low-regret.

    • fix(backend): use empty rollback for the in-place codec migration (000105)

    Per the migrations guideline, in-place column changes (default/codec) take
    --rollback empty — reverting a codec is not a clean inverse once data
    exists, and restoring the provisional 000101 codecs is never a wanted
    recovery step. Replaces the explicit revert-to-000101 rollback.

    • fix(backend): renumber codec migration to 000106 after rebase on main

    main gained 000105_add_id_at_to_spans, so bump the refinements migration to
    000106 (keeps it last) and update the changeset id and the pin-map/whole-row
    references in the test accordingly.

    • fix(backend): apply 000106 changeset id and test references

    Fill in the content the rename-only commit missed: set the migration's
    changeset id to 000106 and update the pin-map/whole-row references in the
    test from 000105 to 000106.


    下载附件