Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/9043 )
Change subject: KUDU-2195 (part 1): always sync PBC-format metadata files ...................................................................... Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/9043/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/9043/1//COMMIT_MSG@15 PS1, Line 15: So, adding the explicit fsync isn't likely to slow down ext4 : much. Could you test this hypothesis? http://gerrit.cloudera.org:8080/#/c/9043/1/src/kudu/util/pb_util.cc File src/kudu/util/pb_util.cc: http://gerrit.cloudera.org:8080/#/c/9043/1/src/kudu/util/pb_util.cc@493 PS1, Line 493: RETURN_NOT_OK_PREPEND(env->SyncDir(DirName(path)), "Failed to SyncDir() parent of " + path); I think this part is the only real loss of expressivity in the patch, because we lose the ability to create several PB files in the same directory and "batch up" the syncing of the directory by only passing pb_util::SYNC in the last call. Of course, with the old code you'd need to sync all but the last newly created PB file out-of-band so this metaphor certainly wasn't perfect (and likely unused by Kudu). Probably not worth keeping. http://gerrit.cloudera.org:8080/#/c/9043/1/src/kudu/util/pb_util.cc@993 PS1, Line 993: // TODO(todd) consider using O_DIRECT to avoid the "write, fsync, rename, syncdir" dance. I scanned the linked e-mail thread but it wasn't clear to me whether Ted's suggestion was specific to ext4 or applies to any POSIX filesystem (which would presumably include macOS as well). Do you know? -- To view, visit http://gerrit.cloudera.org:8080/9043 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4f0c911662b2ff35fcf3915790248ba85bf6026f Gerrit-Change-Number: 9043 Gerrit-PatchSet: 1 Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Comment-Date: Wed, 17 Jan 2018 21:52:53 +0000 Gerrit-HasComments: Yes
