jojochuang commented on code in PR #7047:
URL: https://github.com/apache/ozone/pull/7047#discussion_r1720339792
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java:
##########
@@ -91,7 +95,7 @@ enum StreamAction {
// how much of data is actually written yet to underlying stream
private long offset;
// how much data has been ingested into the stream
- private volatile long writeOffset;
+ private long writeOffset;
Review Comment:
wouldn't this cause problem? writeOffset's value is used in hsync() without
any lock or synchronization.
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java:
##########
@@ -174,7 +180,7 @@ public KeyOutputStream(Builder b) {
* @param version the set of blocks that are pre-allocated.
* @param openVersion the version corresponding to the pre-allocation.
*/
- public synchronized void addPreallocateBlocks(OmKeyLocationInfoGroup
version, long openVersion) {
Review Comment:
Got it. BlockOutputStreamEntryPool.addPreallocateBlocks() is synchronized so
no need to synchronize here.
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/BlockOutputStreamEntryPool.java:
##########
@@ -379,7 +380,7 @@ BlockOutputStreamEntry getCurrentStreamEntry() {
* @return the new current open stream to write to
Review Comment:
update javadoc for the new parameter. When should it be true/false?
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java:
##########
@@ -227,7 +235,7 @@ public static void init() throws Exception {
(OpenKeyCleanupService)
cluster.getOzoneManager().getKeyManager().getOpenKeyCleanupService();
openKeyCleanupService.suspend();
- preFinalizationChecks();
+// preFinalizationChecks();
Review Comment:
[HDDS-11292](https://issues.apache.org/jira/browse/HDDS-11292) fixed this
problem. Need to rebase for this.
--
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]