Updates to RecordDataHeader#1840
Merged
Merged
Conversation
…in RecordDataHeader
…this will be done later but the necessary record format is in place
badrishc
approved these changes
Jun 1, 2026
badrishc
requested changes
Jun 1, 2026
badrishc
left a comment
Collaborator
There was a problem hiding this comment.
Can we have inline thresholds more like this: 1 KB keys (10 bits) + 16 MB values (24 bits) = 34 bits
badrishc
approved these changes
Jun 2, 2026
badrishc
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the codebase to use the
DataHeaderproperty instead of theInfoandRecordDataHeaderproperties for accessing metadata on log records. This change improves consistency and prepares the code for future enhancements by centralizing metadata access. Additionally, it updates documentation and value range logic for value overflow thresholds.Key changes include:
Refactoring to use
DataHeader:Make RecordDataHeader fixed 16 bytes, with keys and values fixed at 12 and 22 bits respectively for length, instead of variable-bytelen. Anything over this becomes overflow.
Replaced all usages of
logRecord.InfoandlogRecord.RecordDataHeaderwithlogRecord.DataHeaderfor properties likeValueIsObject,HasExpiration,HasETag,ValueIsInline, andRecordTypethroughout the codebase, including in expiration checks, type checks, and record management logic. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]Documentation and configuration updates:
GarnetServerOptions.csto clarify and adjust the allowed value range forValueOverflowThresholdBytes, now using a direct value with new min/max constants.Other codebase updates:
InitialDeleter, likely because the newDataHeaderabstraction handles this elsewhere.These updates should make metadata handling more robust and less error-prone by consolidating access patterns.