ChenSammi commented on code in PR #6054:
URL: https://github.com/apache/ozone/pull/6054#discussion_r1462719870


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java:
##########
@@ -279,18 +249,69 @@ public void testOverwriteHSyncFile() throws Exception {
     }
   }
 
-  static void runTestHSync(FileSystem fs, Path file, int initialDataSize)

Review Comment:
   The ITestOzoneContractCreate and ITestRootedOzoneContractCreate failed 
because the current KeyInputStream reads the data until the file length, while 
the file length is calculated by the block length which is updated by hsync. 
   
   I checked the HDFS behavior.  DFSInputStream will query DN for the last 
block length if the file's last block is UC. That's why HDFS can pass the FS 
contract test.  
   
   After we reduce the hsync call to OM, we should also implement such read 
logic in KeyInputStream too. Let's see what I can do.



-- 
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]

Reply via email to