eduwercamacaro commented on code in PR #21750:
URL: https://github.com/apache/kafka/pull/21750#discussion_r2942117329
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/AbstractDualSchemaRocksDBSegmentedBytesStore.java:
##########
@@ -254,18 +253,14 @@ public void init(final StateStoreContext
stateStoreContext, final StateStore roo
metrics
);
- final File positionCheckpointFile = new
File(stateStoreContext.stateDir(), name() + ".position");
- this.positionCheckpoint = new OffsetCheckpoint(positionCheckpointFile);
- this.position =
StoreQueryUtils.readPositionFromCheckpoint(positionCheckpoint);
- segments.setPosition(this.position);
-
segments.openExisting(internalProcessorContext, observedStreamTime);
+ this.position = segments.position;
// register and possibly restore the state from the logs
stateStoreContext.register(
root,
(RecordBatchingStateRestoreCallback) this::restoreAllInternal,
- () -> StoreQueryUtils.checkpointPosition(positionCheckpoint,
position)
+ () -> { } // Nothing to do?
Review Comment:
Thanks @bbejeck I addressed this.
At first, I was confused about this because the underlying store should be
supposed to persist the position after commit, but that's not true for
segmented stores.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]