This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new cd2ad7a8bf8 HDDS-16781. Fix intermittent ReadChunk count mismatch in
TestKeyInputStream (#11443)
cd2ad7a8bf8 is described below
commit cd2ad7a8bf83b02eaf36b2c5d9e3a491b498456c
Author: Siyao Meng <[email protected]>
AuthorDate: Thu Oct 8 05:17:41 2026 -0700
HDDS-16781. Fix intermittent ReadChunk count mismatch in TestKeyInputStream
(#11443)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
---
.../hadoop/ozone/client/rpc/read/TestKeyInputStream.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java
index 61ff59abe43..491d7fa802b 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java
@@ -20,6 +20,7 @@
import static org.apache.hadoop.hdds.client.ECReplicationConfig.EcCodec.RS;
import static
org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationFactor.THREE;
import static org.apache.hadoop.ozone.container.OzoneTestHelper.countReplicas;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
@@ -272,8 +273,10 @@ public void testSeek(BucketForTesting bucket) throws
Exception {
// Since we read data from index 150 to 250 and the chunk boundary is
// 100 bytes, we need to read 2 chunks.
- assertEquals(readChunkCount + 2,
- metrics.getContainerOpCountMetrics(ContainerProtos.Type.ReadChunk));
+ // A ReadChunk to a follower that has not yet applied the block fails with
UNKNOWN_BCSID and is retried on
+ // another datanode, which is counted again.
+
assertThat(metrics.getContainerOpCountMetrics(ContainerProtos.Type.ReadChunk))
+ .isGreaterThanOrEqualTo(readChunkCount + 2);
keyInputStream.close();
@@ -365,8 +368,10 @@ private void testSkip(BucketForTesting bucket) throws
Exception {
// Since we reading data from index 150 to 250 and the chunk boundary is
// 100 bytes, we need to read 2 chunks.
- assertEquals(readChunkCount + 2,
- metrics.getContainerOpCountMetrics(ContainerProtos.Type.ReadChunk));
+ // A ReadChunk to a follower that has not yet applied the block fails with
UNKNOWN_BCSID and is retried on
+ // another datanode, which is counted again.
+
assertThat(metrics.getContainerOpCountMetrics(ContainerProtos.Type.ReadChunk))
+ .isGreaterThanOrEqualTo(readChunkCount + 2);
keyInputStream.close();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]