You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hexiaoqiao (via GitHub)" <gi...@apache.org> on 2023/02/08 04:09:55 UTC

[GitHub] [hadoop] Hexiaoqiao commented on a diff in pull request #5359: HDFS-16910. Fix incorrectly initializing RandomAccessFile caused flush performance decreased for JN

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


##########
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:
   +1, but we should change it as following? it seems that it is inconsistent with parameter 'shouldSyncWritesAndSkipFsync'?
   ```
       if (shouldSyncWritesAndSkipFsync) {
         rp = new RandomAccessFile(name, "rw");
       } else {
         rp = new RandomAccessFile(name, "rwd");
       }
   ```



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org