Adar Dembo has posted comments on this change. Change subject: [java client] Retry regressing counts in ITClient ......................................................................
Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/4597/3/java/kudu-client/src/test/java/org/apache/kudu/client/ITClient.java File java/kudu-client/src/test/java/org/apache/kudu/client/ITClient.java: Line 386: do { Nit: the loop structure is unusual in that the normal control flow takes us out of the loop (L406) and only a special case keeps us in it (L395). How about restructuring to give it a simpler flow? Something like this maybe: while (KEEP_RUNNING_LATCH.getCount() > 0 && !deadlineTracker.timedOut()) { try { rowCount = countRows(); } catch (KuduException e) { return checkAndReportError(...); } if (rowCount >= lastRowCount) { lastRowCount = rowCount; return true; } // KUDU-430: we need to try again. try { KEEP_RUNNING_LATCH.await(50, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { // No need to do anything, we'll exit the loop once we test getCount() in the condition. } } return !deadlineTracker.timedOut(); -- To view, visit http://gerrit.cloudera.org:8080/4597 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1e79a6c7aaf069294a6ca40e487947d14d9f2aa7 Gerrit-PatchSet: 3 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Jean-Daniel Cryans <jdcry...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org> Gerrit-Reviewer: Jean-Daniel Cryans <jdcry...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-HasComments: Yes