Copilot commented on code in PR #10748:
URL: https://github.com/apache/ozone/pull/10748#discussion_r3581382748
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAFollowerReadWithAllRunning.java:
##########
@@ -264,17 +261,17 @@ void testLinearizableReadConsistency() throws Exception {
ozoneBucket.getVolumeName(), ozoneBucket.getName(), key);
assertEquals(key, keyReadFromAnotherClient.getName());
- // Create a more keys
+ // Create more keys and verify another client can read the last one
after bulk writes.
+ String lastBulkKey = null;
for (int i = 0; i < 100; i++) {
- createKey(ozoneBucket);
+ lastBulkKey = createKey(ozoneBucket);
}
Review Comment:
The bulk keys are created via `createKey(ozoneBucket)`, which uses a 5-digit
random suffix (see `AbstractOzoneManagerHATest#createKey`). With 100 iterations
this has a non-trivial collision probability, which can still make this test
flaky or reduce what it’s actually validating. Consider generating
deterministic/unique key names in the loop and using the `createKey(bucket,
keyName)` overload so each write is guaranteed distinct.
--
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]