ZanderXu commented on code in PR #5359:
URL: https://github.com/apache/hadoop/pull/5359#discussion_r1099712434


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java:
##########
@@ -84,9 +84,9 @@ public EditLogFileOutputStream(Configuration conf, File name, 
int size)
     doubleBuf = new EditsDoubleBuffer(size);
     RandomAccessFile rp;
     if (shouldSyncWritesAndSkipFsync) {

Review Comment:
   `shouldSyncWritesAndSkipFsync=true` means that we will use 
`RandomAccessFile(name, "rwd")` to sync data instead of `fc.force(false)`.
   
   `shouldSyncWritesAndSkipFsync=false` means that we will use 
`fc.force(false)` to sync data, here `rp = new RandomAccessFile(name, "rw");`



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