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


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredTimestampedKeyValueStoreWithHeaders.java:
##########
@@ -381,6 +390,45 @@ 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:
   I'll handle the general fix in a separate PR after this one merges: honor 
`skipCache` for `KeyQuery`/`TimestampedKeyQuery` across the metered key-value 
stores, with the repeated propagation collapsed into a single shared helper. 
Will file a JIRA and link it here.



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