Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/20631 )
Change subject: KUDU-3520 Fix file descriptor leak in encryption ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/20631/2/src/kudu/util/env_posix.cc File src/kudu/util/env_posix.cc: http://gerrit.cloudera.org:8080/#/c/20631/2/src/kudu/util/env_posix.cc@2390 PS2, Line 2390: auto cleanup = MakeScopedCleanup([&]() { : DoClose(fd); : }); According to RAII, would it better to place the releasing the resource where the fd is created(i.e. in NewWritableFile() and NewTempWritableFile()), to make the construct and destruct in pairs? -- To view, visit http://gerrit.cloudera.org:8080/20631 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2412429d4fe836b705296e9e30453d7c4d030cec Gerrit-Change-Number: 20631 Gerrit-PatchSet: 2 Gerrit-Owner: Attila Bukor <abu...@apache.org> Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <ale...@apache.org> Gerrit-Reviewer: Attila Bukor <abu...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yingchun Lai <laiyingc...@apache.org> Gerrit-Reviewer: Zoltan Chovan <zcho...@cloudera.com> Gerrit-Comment-Date: Mon, 13 Nov 2023 04:51:39 +0000 Gerrit-HasComments: Yes