jojochuang commented on code in PR #7792:
URL: https://github.com/apache/ozone/pull/7792#discussion_r1946990956
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java:
##########
@@ -583,6 +583,49 @@ public void testHSyncDeletedKey() throws Exception {
}
}
+ static Stream<BucketLayout> bucketLayouts() {
+ return Stream.of(BucketLayout.FILE_SYSTEM_OPTIMIZED, BucketLayout.LEGACY);
+ }
+
+ @ParameterizedTest
+ @MethodSource("bucketLayouts")
+ public void testBatchKeyDeletionWithHSync(BucketLayout bucketLayout) throws
Exception {
+ // Create a bucket with the specified layout
+ OzoneBucket testBucket = TestDataUtil.createVolumeAndBucket(client,
bucketLayout);
+
+ final String rootPath = String.format("%s://%s/",
+ OZONE_OFS_URI_SCHEME, CONF.get(OZONE_OM_ADDRESS_KEY));
+ CONF.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, rootPath);
+
+ final String dir = OZONE_ROOT + testBucket.getVolumeName()
+ + OZONE_URI_DELIMITER + testBucket.getName();
+
+ // Create multiple files, some with hsync
+ final int numFiles = 5;
+ List<String> openKeys = new ArrayList<>();
+
+ try (FileSystem fs = FileSystem.get(CONF)) {
+ for (int i = 0; i < numFiles; i++) {
+ String keyName = "batch-key-" + i;
+ Path file = new Path(dir, keyName);
+ try (FSDataOutputStream os = fs.create(file, true)) {
+ os.write(1);
+ os.hsync();
+ openKeys.add(keyName);
+ }
Review Comment:
That sounds like a product bug to me. Potentially something inside
OmKeysDeleteRequestWithFSO.
Note: we have two separate request types for handling single delete and
batch deletes. So mistakes can happen.
--
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]