Skip to content

Conversation

@annrpom
Copy link
Contributor

@annrpom annrpom commented Jan 15, 2026

Previously, values existing in both hot and cold tiers had no mechanism to store both blob handles.

This adds a coldBlobHandles column to the columnar data block format for storing cold blob handles when a value exists in both tiers. The new AddWithDualTierBlobHandles method writes entries with the hot handle in the value column and the cold handle in the dedicated column. The tiering histogram now tracks hot-and-cold blob reference bytes separately.

Row-based writers return an error for dual-tier handles since they don't support the required columns

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@annrpom annrpom force-pushed the hot-and-hold-blob branch 2 times, most recently from 1bc7efe to 5822dcb Compare January 21, 2026 17:48
@github-actions
Copy link

Potential Bug(s) Detected

The three-stage Claude Code analysis has identified potential bug(s) in this PR that may warrant investigation.

Next Steps:
Please review the detailed findings in the workflow run.

Note: When viewing the workflow output, scroll to the bottom to find the Final Analysis Summary.

After you review the findings, please tag the issue as follows:

  • If the detected issue is real or was helpful in any way, please tag the issue with O-AI-Review-Real-Issue-Found
  • If the detected issue was not helpful in any way, please tag the issue with O-AI-Review-Not-Helpful

@github-actions
Copy link

Potential Bug(s) Detected

The three-stage Claude Code analysis has identified potential bug(s) in this PR that may warrant investigation.

Next Steps:
Please review the detailed findings in the workflow run.

Note: When viewing the workflow output, scroll to the bottom to find the Final Analysis Summary.

After you review the findings, please tag the issue as follows:

  • If the detected issue is real or was helpful in any way, please tag the issue with O-AI-Review-Real-Issue-Found
  • If the detected issue was not helpful in any way, please tag the issue with O-AI-Review-Not-Helpful

Previously, values existing in both hot and cold tiers had no mechanism to
store both blob handles.

This adds a coldBlobHandles column to the columnar data block format for
storing cold blob handles when a value exists in both tiers. The new
AddWithDualTierBlobHandles method writes entries with the hot handle in the
value column and the cold handle in the dedicated column. The tiering histogram
now tracks hot-and-cold blob reference bytes separately.

Row-based writers return an error for dual-tier handles since they don't
support the required columns
@annrpom annrpom marked this pull request as ready for review January 21, 2026 22:50
@annrpom annrpom requested a review from a team as a code owner January 21, 2026 22:51
@annrpom annrpom requested a review from xinhaoz January 21, 2026 22:51
Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sumeerbhola reviewed 14 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @annrpom and @xinhaoz).


-- commits line 11 at r1:
Is there a unit test that tries to retrieve the value using the secondary handle and validates that we get the same result, or will that come later when the read path is more ready?


sstable/colblk/data_block.go line 494 at r1 (raw file):

	// secondaryBlobHandles stores secondary blob handles for dual-tier blob values.
	// This column is ONLY populated when a value exists in multiple tiers simultaneously.
	// For single-tier blobs (whether hot or cold), this column stores an empty slice.

Consider also saying that for dual-tier blob values the cold tier handle is placed here, so that normal accesses should use the cheaper access path of the primary blob handle.


sstable/colblk_writer.go line 537 at r1 (raw file):

	eval.isObsolete = eval.isObsolete || forceObsolete
	w.prevPointKey.trailer = key.Trailer
	w.prevPointKey.isObsolete = eval.isObsolete

can we avoid duplicating a bunch of this code from AddWithBlobHandle and have both delegate to an internal helper, which does nothing with the secondaryHandle if it is empty?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants