bbejeck commented on code in PR #22626:
URL: https://github.com/apache/kafka/pull/22626#discussion_r3444580490


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/InMemoryKeyValueStore.java:
##########
@@ -85,7 +86,12 @@ public void init(final StateStoreContext stateStoreContext,
                 (RecordBatchingStateRestoreCallback) records -> {
                     synchronized (position) {
                         for (final ConsumerRecord<byte[], byte[]> record : 
records) {
-                            put(Bytes.wrap(record.key()), record.value());
+                            final Bytes key = Bytes.wrap(record.key());

Review Comment:
   this inlines `map.put/get` vs calling `put` -> `putInternal` which in turn 
called ` StoreQueryUtils.updatePosition(position, context)` so `position` is 
now dropped, so maybe use `putInternal` which would preserve the `position`



-- 
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]

Reply via email to