smjn commented on code in PR #18514: URL: https://github.com/apache/kafka/pull/18514#discussion_r1914289210
########## core/src/main/java/kafka/server/share/SharePartition.java: ########## @@ -456,6 +456,17 @@ public CompletableFuture<Void> maybeInitialize() { stateBatch.lastOffset(), RecordState.forId(stateBatch.deliveryState()), stateBatch.deliveryCount(), null); cachedState.put(stateBatch.firstOffset(), inFlightBatch); } + + long initialOffset = startOffset; Review Comment: Doesn't seem right lets say ``` startOffset = 10 and batches = [(15,20,1,1), (21,25,2,2)] - you will check (15,20,1,1) and produce (10, 14, 0, 0) and put 10-> (10, 14, 0, 0), initial = 21 - then you will check (21, 25, 2, 2) and produce (21, 20, 0, 0) and put 21 -> (21, 20, 0, 0), initial = 26 ``` Is that expected? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org