Attila Bukor has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15629 )

Change subject: [postgres] Deflake MiniPostgres tests
......................................................................


Patch Set 6:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/15629/4/src/kudu/postgres/mini_postgres.h
File src/kudu/postgres/mini_postgres.h:

http://gerrit.cloudera.org:8080/#/c/15629/4/src/kudu/postgres/mini_postgres.h@88
PS4, Line 88: s connection t
> nit: can you add a comment for this method?
Done


http://gerrit.cloudera.org:8080/#/c/15629/4/src/kudu/postgres/mini_postgres.cc
File src/kudu/postgres/mini_postgres.cc:

http://gerrit.cloudera.org:8080/#/c/15629/4/src/kudu/postgres/mini_postgres.cc@92
PS4, Line 92:   // TODO(abukor): implement retry with a different port if it 
can't bind
            :     WARN_NOT_OK(process_->Kill(SIGINT), "failed to send SIGINT to 
Postgres");
            :     return wait;
            :   }
            :
> RETURN_NOT_OK_PREPEND?
hm actually this is returning WaitForTcpBind()'s return value, but it's also 
important to kill the process if it fails, so I don't think that's applicable 
here.


http://gerrit.cloudera.org:8080/#/c/15629/4/src/kudu/postgres/mini_postgres.cc@149
PS4, Line 149:   MonoTime start = MonoTime::Now();
             :   while (true) {
             :     Subprocess psql({
             :         JoinPathSegments(bin_dir_, "postgres/pg_isready"),
             :         "-p", SimpleItoa(port_),
             :         "-h", host_,
             :     });
             :     RETURN_NOT_OK(psql.Start());
             :     s = psql.WaitAndCheckExitCode();
             :     if (s.ok()) {
             :       return s;
             :     }
             :
             :     if ((MonoTime::Now() - start) > kTimeout) {
             :       break;
             :     }
             :     SleepFor(MonoDelta::FromMilliseconds(100));
             :   }
> nit: why bother with exponential backoff at all? We don't expect much load
Done


http://gerrit.cloudera.org:8080/#/c/15629/4/src/kudu/postgres/mini_postgres.cc@168
PS4, Line 168:   return s;
> Could you preserve the first (or last) result of WaitAndCheckExitCode(), an
Done



--
To view, visit http://gerrit.cloudera.org:8080/15629
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5106b3e2aeb9dabad9a7ee0b17059c1df2042bb4
Gerrit-Change-Number: 15629
Gerrit-PatchSet: 6
Gerrit-Owner: Attila Bukor <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 01 Apr 2020 21:12:54 +0000
Gerrit-HasComments: Yes

Reply via email to