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


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimestampedStoreWithHeaders.java:
##########
@@ -199,6 +200,22 @@ private void openFromTimestampedStore(final DBOptions 
dbOptions,
     public <R> QueryResult<R> query(final Query<R> query,
                                     final PositionBound positionBound,
                                     final QueryConfig config) {
+        // PoC (KIP-1356): serve raw KeyQuery from the persistent store so 
that the header-aware
+        // IQv2 query forwarded by MeteredTimestampedKeyValueStoreWithHeaders 
keeps working after the
+        // record cache has been flushed (a cache miss falls through to this 
layer). The returned bytes
+        // are the serialized ValueTimestampHeaders; the metered store 
performs the header-aware
+        // deserialization. Other query types remain unsupported for now.
+        if (query instanceof KeyQuery) {

Review Comment:
   I think this path is actually safe. `handleBasicQueries` takes the position 
lock itself: it wraps its whole body in `synchronized (position)` and does the 
`position.copy()` inside that block



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