Skip to content

compaction: carry Titan raw size hints to table collectors - #444

Draft
hbisheng wants to merge 3 commits into
tikv:8.10.tikvfrom
hbisheng:bh-titan-raw-size-map
Draft

hbisheng wants to merge 3 commits into
tikv:8.10.tikvfrom
hbisheng:bh-titan-raw-size-map

Conversation

@hbisheng

@hbisheng hbisheng commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Problem and change

Titan needs to carry the raw length of the current blob value from an input SST to the output table collectors. Add an optional iterator hint and explicit builder/collector arguments for this length. Compaction keeps the hint with its current entry and clears it when the value changes. Iterator wrappers forward the hint from the active input.

Default implementations keep existing callers working. Titan owns the property encoding, lookup and backfill.

This is a draft PoC for tikv/tikv#20419. BlobIndex, blob files and WAL keep their existing formats. The new SST property is optional; old readers can ignore it and old compactions can drop it.

Dependencies and validation

The companion Titan, rust-rocksdb and TiKV changes use this interface. Their draft PRs are linked below.

  • Built with the companion Titan and TiKV heads. All 17 Titan raw-size tests and 56 engine_rocks tests passed on the final code set.
  • An earlier code set passed a three-replica cluster experiment covering compression-factor split/merge storms, forced compaction repair, GC, restart, snapshots and data-format downgrade.
  • The latest code set still needs the full cluster rerun and long-running tests. No full upstream RocksDB test suite was run for this draft.

The branch is based on 37ab6137; the PR targets 8.10.tikv. It is three upstream commits behind at draft creation.

Companion draft PRs

Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
@ti-chi-bot ti-chi-bot Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 30, 2026
@ti-chi-bot

ti-chi-bot Bot commented Nov 30, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot Bot added the dco-signoff: yes Indicates the PR's author has signed the dco. label Nov 30, 2026
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ti-chi-bot ti-chi-bot Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 30, 2026
@ti-chi-bot

ti-chi-bot Bot commented Nov 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign spadea-tang for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant