guihecheng commented on a change in pull request #3127:
URL: https://github.com/apache/ozone/pull/3127#discussion_r814506286
##########
File path:
hadoop-ozone/client/src/test/java/org/apache/hadoop/ozone/client/TestOzoneECClient.java
##########
@@ -908,6 +911,107 @@ public void testPartialStripeWithPartialChunkRetry()
}
}
+ @Test
+ public void testDiscardPreAllocatedBlocksPreventRetryExceeds()
+ throws IOException {
+ close();
+ OzoneConfiguration con = new OzoneConfiguration();
+ int maxRetries = 3;
+ con.setStorageSize(OzoneConfigKeys.OZONE_SCM_BLOCK_SIZE,
+ 2, StorageUnit.KB);
+ con.setInt(OzoneConfigKeys.OZONE_CLIENT_MAX_EC_STRIPE_WRITE_RETRIES,
+ maxRetries);
+ MultiNodePipelineBlockAllocator blkAllocator =
+ new MultiNodePipelineBlockAllocator(con, dataBlocks + parityBlocks,
+ 15);
+ createNewClient(con, blkAllocator);
+
+ store.createVolume(volumeName);
+ OzoneVolume volume = store.getVolume(volumeName);
+ volume.createBucket(bucketName);
+ OzoneBucket bucket = volume.getBucket(bucketName);
+
+ int numStripesBeforeFailure = 1;
+ int numStripesAfterFailure = 1;
+ int numSTripesTotal = numStripesBeforeFailure + numStripesAfterFailure;
+ int numChunksToWriteAfterFailure = dataBlocks;
+ int numExpectedBlockGrps = 2;
+ // fail the DNs for parity blocks
+ int[] nodesIndexesToMarkFailure = {3, 4};
+
+ try (OzoneOutputStream out = bucket.createKey(keyName,
Review comment:
Oh, it seems a mistakenly write size for the key, there's another
variable `numPreAllocatedBlocks` below with comments, the
`numPreAllocatedBlocks` should be > EC max retries, so we intend to show that
if pre-allocated block are not dropped, they will be used during retry which is
worthless for the same pipeline.
--
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]