Attila Bukor 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: (2 comments) http://gerrit.cloudera.org:8080/#/c/20631/1/src/kudu/util/env_posix.cc File src/kudu/util/env_posix.cc: http://gerrit.cloudera.org:8080/#/c/20631/1/src/kudu/util/env_posix.cc@1569 PS1, Line 1569: MAYBE_RETURN_EIO(fname, IOError(Env::kInjectedFailureStatusMsg, EIO)); > If you don't like that idea or it looks cumbersome, I'm fine keeping the cu tbh it does feel a little weird to do it that way. Can't use a simple move constructor because of the extra parameters, and we need a bunch of extra constructors for it that are used in a single place basically. I don't feel strongly about it, so if you think that approach would still be cleaner than the scoped cleanup, I can go ahead and submit a new rev. 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 wher Done -- 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 <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Zoltan Chovan <[email protected]> Gerrit-Comment-Date: Mon, 13 Nov 2023 17:56:11 +0000 Gerrit-HasComments: Yes
