Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/15374 )
Change subject: KUDU-3079 Add MiniPostgres ...................................................................... Patch Set 21: (8 comments) http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/postgres/mini_postgres.h File src/kudu/postgres/mini_postgres.h: http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/postgres/mini_postgres.h@82 PS21, Line 82: env->GetExecutablePath(&exe); nit: CHECK_OK here or log if this fails? http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/postgres/mini_postgres.cc File src/kudu/postgres/mini_postgres.cc: http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/postgres/mini_postgres.cc@57 PS21, Line 57: this-> nit: remove? http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/postgres/mini_postgres.cc@62 PS21, Line 62: unique_ptr nit: this doesn't need to be heap-allocated http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/postgres/mini_postgres.cc@90 PS21, Line 90: "$0:$$PATH" Do we need to evaluate this? http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/postgres/mini_postgres.cc@117 PS21, Line 117: Substitute("$0", port_) nit: could we use IntToString() from gutil/strings/numbers.h instead of Substitute? Same elsewhere. http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/postgres/mini_postgres.cc@133 PS21, Line 133: const string& pg_root nit: rather than allowing this to be any path/string, how about taking no args and calling pg_root() in this method? That way it's harder to misuse accidentally. http://gerrit.cloudera.org:8080/#/c/15374/15/src/kudu/ranger/mini_postgres.cc File src/kudu/ranger/mini_postgres.cc: http://gerrit.cloudera.org:8080/#/c/15374/15/src/kudu/ranger/mini_postgres.cc@97 PS15, Line 97: : > From the execvp manpage: Ah, when I read through that page I assumed it was referring to the first argument of execvp ('path'), rather than the first element of 'arg', but it's pretty clearly talking about *arg here. http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/util/subprocess.cc File src/kudu/util/subprocess.cc: http://gerrit.cloudera.org:8080/#/c/15374/21/src/kudu/util/subprocess.cc@556 PS21, Line 556: Status Subprocess::WaitAndCheckExitCode() { Should this be reusing GetExitStatus()? If not, why not? -- To view, visit http://gerrit.cloudera.org:8080/15374 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iba40126aa60e0ecbc5ae10cc1328493194c345bc Gerrit-Change-Number: 15374 Gerrit-PatchSet: 21 Gerrit-Owner: Attila Bukor <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Sun, 22 Mar 2020 22:52:19 +0000 Gerrit-HasComments: Yes
