ss77892 commented on code in PR #10959:
URL: https://github.com/apache/ozone/pull/10959#discussion_r3737320887


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMRatisSnapshots.java:
##########
@@ -288,6 +288,10 @@ public void testInstallSnapshotWithClientWrite() throws 
Exception {
     });
     List<String> newKeys = writeFuture.get();
 
+    // A write is acked once queued in the double buffer, but the applied index
+    // advances only after the buffer commits. Flush so it covers all newKeys.
+    leaderOM.awaitDoubleBufferFlush();

Review Comment:
   This isn't the #10748 case. Nothing here waits for a flush to make a key 
visible. TypedTable.get() checks the cache first, so a key is readable as soon 
as the write returns.
   The bug is about the wait target. The test waited for the follower's applied 
index to reach the leader's applied index, but that index only moves when the 
double buffer flushes. The correct target should be Ratis commit index. Writes 
are acked only after their entries are committed, so this index should cover 
all of them.
   I also fixed two other tests for consistency's sake. 
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to