KAFKA-19713: Persist Position into offsets CF#21750
Draft
eduwercamacaro wants to merge 1 commit intoapache:trunkfrom
Draft
KAFKA-19713: Persist Position into offsets CF#21750eduwercamacaro wants to merge 1 commit intoapache:trunkfrom
eduwercamacaro wants to merge 1 commit intoapache:trunkfrom
Conversation
bbejeck
reviewed
Mar 14, 2026
Member
bbejeck
left a comment
There was a problem hiding this comment.
Thanks @eduwercamacaro for the PR, I have a few comments
| root, | ||
| (RecordBatchingStateRestoreCallback) this::restoreAllInternal, | ||
| () -> StoreQueryUtils.checkpointPosition(positionCheckpoint, position) | ||
| () -> { } // Nothing to do? |
Member
There was a problem hiding this comment.
Write the position here, since on open/read we merge positions for all segments. Plus the cost is small since it's small entry. Same for the other callbacks
| root, | ||
| (RecordBatchingStateRestoreCallback) this::restoreAllInternal, | ||
| () -> StoreQueryUtils.checkpointPosition(positionCheckpoint, position) | ||
| () -> { } // Nothing to do? |
| cfAccessor.commit(dbAccessor, position); | ||
| } catch (final RocksDBException e) { | ||
| // TODO: fatal error? | ||
| throw new RuntimeException(e); |
Member
There was a problem hiding this comment.
I would say since the position is for IQ only and doesn't affect data correctness I'd say log a WARN
| * @throws StreamsException if an invalid state is found and ignoreInvalidState is false | ||
| */ | ||
| void open(final RocksDBStore.DBAccessor accessor, final boolean ignoreInvalidState) throws RocksDBException, StreamsException; | ||
| Position open(final RocksDBStore.DBAccessor accessor, final boolean ignoreInvalidState) throws RocksDBException, StreamsException; |
Member
There was a problem hiding this comment.
Need to update JavaDoc that open returns a Position
| root, | ||
| (RecordBatchingStateRestoreCallback) RocksDBVersionedStore.this::restoreBatch, | ||
| () -> StoreQueryUtils.checkpointPosition(positionCheckpoint, position) | ||
| () -> { } // Nothing to do? |
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.
As part of the implementation of KIP-1035, this PR adds the ability to store the position offsets into the
OffsetsColumnFamily.Also, it aims to migrate any pre-existing position file into the offsets CF.