Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/15629 )
Change subject: [postgres] Deflake MiniPostgres tests ...................................................................... Patch Set 4: (1 comment) 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@149 PS4, Line 149: uint8_t i = 0; : while (true) { : Subprocess psql({ : JoinPathSegments(bin_dir_, "postgres/pg_isready"), : "-p", SimpleItoa(port_), : "-h", host_, : }); : RETURN_NOT_OK(psql.Start()); : Status s = psql.WaitAndCheckExitCode(); : if (s.ok()) { : return s; : } : : if (i + 1 >= kRetries) { : break; : } : SleepFor(MonoDelta::FromMilliseconds(100*pow(2,i++))); : } nit: why bother with exponential backoff at all? We don't expect much load on Postgres, so it's not like we're trying to find an acceptable rate of calling. How do you feel about a fixed retry interval and a MonoTime deadline instead? -- 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: 4 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 20:57:15 +0000 Gerrit-HasComments: Yes
