nicktelford commented on code in PR #22314:
URL: https://github.com/apache/kafka/pull/22314#discussion_r3341538761


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/CachingWindowStore.java:
##########
@@ -170,242 +174,200 @@ public synchronized void put(final Bytes key,
     }
 
     @Override
-    public byte[] fetch(final Bytes key,
-                        final long timestamp) {
+    public byte[] fetch(final Bytes key, final long timestamp) {
+        return fetchPointInternal(key, timestamp, wrapped());
+    }
+
+    private byte[] fetchPointInternal(final Bytes key,
+                                      final long timestamp,
+                                      final ReadOnlyWindowStore<Bytes, byte[]> 
source) {
         validateStoreOpen();
         final Bytes bytesKey = WindowKeySchema.toStoreKeyBinary(key, 
timestamp, 0);
         final Bytes cacheKey = cacheFunction.cacheKey(bytesKey);
         if (internalContext.cache() == null) {
-            return wrapped().fetch(key, timestamp);
+            return source.fetch(key, timestamp);
         }
         final LRUCacheEntry entry = internalContext.cache().get(cacheName, 
cacheKey);
         if (entry == null) {
-            return wrapped().fetch(key, timestamp);
+            return source.fetch(key, timestamp);
         } else {
             return entry.value();
         }
     }
 
+
     @Override
-    public synchronized WindowStoreIterator<byte[]> fetch(final Bytes key,

Review Comment:
   Good catch! It's been reinstated now.



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