showuon commented on a change in pull request #11187:
URL: https://github.com/apache/kafka/pull/11187#discussion_r684704759



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/MergedSortedCacheWindowStoreIterator.java
##########
@@ -43,7 +45,7 @@
 
     @Override
     Long deserializeCacheKey(final Bytes cacheKey) {
-        final byte[] binaryKey = bytesFromCacheKey(cacheKey);
+        final ByteBuffer binaryKey = bytesFromCacheKey(cacheKey);
         return WindowKeySchema.extractStoreTimestamp(binaryKey);

Review comment:
       Another example that we avoided the unnecessary array copy by returning 
sliced byte buffer via `bytesFromCacheKey`




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


Reply via email to