This is an automated email from the ASF dual-hosted git repository.
weichiu 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 16322fdfa5 Add flush to buffer (#7609)
16322fdfa5 is described below
commit 16322fdfa5c92794b565e83300c30adda3c9f042
Author: Chia-Chuan Yu <[email protected]>
AuthorDate: Sun Dec 22 04:41:23 2024 +0800
Add flush to buffer (#7609)
---
.../src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java
index f185addf6b..d00b86d937 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java
@@ -181,7 +181,7 @@ public class TestHSync {
public static void init() throws Exception {
final BucketLayout layout = BUCKET_LAYOUT;
- CONF.setBoolean(OZONE_OM_RATIS_ENABLE_KEY, false);
+ CONF.setBoolean(OZONE_OM_RATIS_ENABLE_KEY, true);
CONF.set(OZONE_DEFAULT_BUCKET_LAYOUT, layout.name());
CONF.setBoolean(OzoneConfigKeys.OZONE_HBASE_ENHANCEMENTS_ALLOWED, true);
CONF.setBoolean("ozone.client.hbase.enhancements.allowed", true);
@@ -1426,9 +1426,12 @@ public class TestHSync {
outputStream2.hsync();
outputStream2.close();
assertEquals(data1.length() + data2.length(),
metrics.getDataCommittedBytes());
+ // wait until double buffer flush
+ cluster.getOzoneManager().awaitDoubleBufferFlush();
Map<String, OmKeyInfo> openKeys = getAllOpenKeys(openKeyTable);
Map<String, RepeatedOmKeyInfo> deletedKeys =
getAllDeletedKeys(deletedTable);
+
// There should be no key in openKeyTable
assertEquals(0, openKeys.size());
// There should be one key in delete table
@@ -1503,6 +1506,8 @@ public class TestHSync {
// hsync/close second hsync key should success
outputStream2.hsync();
outputStream2.close();
+ // wait until double buffer flush
+ cluster.getOzoneManager().awaitDoubleBufferFlush();
Map<String, OmKeyInfo> openKeys = getAllOpenKeys(openKeyTable);
Map<String, RepeatedOmKeyInfo> deletedKeys =
getAllDeletedKeys(deletedTable);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]