gabriellefu commented on code in PR #23184:
URL: https://github.com/apache/kafka/pull/23184#discussion_r3844541925


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java:
##########
@@ -536,21 +536,25 @@ public <R> QueryResult<R> query(
         final PositionBound positionBound,
         final QueryConfig config) {
 
-        synchronized (position) {
-            final Position queryPosition;
-            if (config.getIsolationLevel() == IsolationLevel.READ_COMMITTED) {
-                queryPosition = position;
-            } else {
-                queryPosition = 
position.copy().merge(dbAccessor.uncommittedPositionDeltas());
+        // Lock order must match the write paths (store monitor, then 
position),
+        // otherwise concurrent put/query can deadlock (KAFKA-19629).
+        synchronized (this) {

Review Comment:
   I have added the test back
   



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