Jess668 commented on code in PR #22666:
URL: https://github.com/apache/kafka/pull/22666#discussion_r3529882720


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredTimestampedKeyValueStoreWithHeaders.java:
##########
@@ -381,6 +385,70 @@ private <R> QueryResult<R> runTimestampedKeyQuery(
         return result;
     }
 
+    @SuppressWarnings("unchecked")
+    private <R> QueryResult<R> runTimestampedKeyWithHeadersQuery(
+        final Query<R> query,
+        final PositionBound positionBound,
+        final QueryConfig config
+    ) {
+        final QueryResult<R> result;
+        final TimestampedKeyWithHeadersQuery<K, V> typedKeyQuery = 
(TimestampedKeyWithHeadersQuery<K, V>) query;
+
+        // Forward a raw byte-level KeyQuery to the wrapped store, propagating 
skipCache so the caching
+        // layer can honor it; the result bytes are the serialized 
ValueTimestampHeaders, which we
+        // deserialize below to recover value, timestamp, and headers.
+        KeyQuery<Bytes, byte[]> rawKeyQuery = 
KeyQuery.withKey(serializeKey(typedKeyQuery.key(), internalContext.headers()));
+        if (typedKeyQuery.isSkipCache()) {

Review Comment:
   [KAFKA-20776](https://issues.apache.org/jira/browse/KAFKA-20776)



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