Will Berkeley has uploaded this change for review. ( http://gerrit.cloudera.org:8080/13495
Change subject: [java] Deflake TestKuduScanner.testDiffScan ...................................................................... [java] Deflake TestKuduScanner.testDiffScan I noticed a funny failure in TestKuduScanner.testDiffScan: 21:55:41.681 [DEBUG - New I/O worker #13] (AsyncKuduScanner.java:556) Can not open scanner org.apache.kudu.client.NonRecoverableException: snapshot scan start timestamp is earlier than the ancient history mark. Consider increasing the value of the configuration parameter --tablet_history_max_age_sec. Snapshot timestamp: P: 0 usec, L: 0 Ancient History Mark: P: 1558907741677535 usec, L: 0 Physical time difference: -1558907741.678s The client logs the request it sent, which indeed has a 'snap_start_timestamp' of 0. This timestamp is supposed to come from incrementing the propagated timestamp received from the client after some random inserts and mutations. Fortunately, this test has nice logging: it logs the operations it did and the timestamp: 21:55:40.874 [INFO - Time-limited test] (TestKuduScanner.java:250) Before: {} 21:55:40.874 [INFO - Time-limited test] (TestKuduScanner.java:255) startHT: 0 'generateMutationOperations' could generate 0 mutations, causing this test to fail. This requires the random number generate to generate 0 3 times in a row when sample uniformly from {0, 1, 2, 3, 4}, so the odds of failure due to this defect in the tests were only 1/125. I fixed this by adjusting the number of inserts generated so it is always at least 1. I ran the test 1250 times with the fix and saw zero failures. Without the fix, I saw 9/1250 failures. Change-Id: Iadb46e5dae71724aa8ff88d04c40ef4eaf1ddd2a --- M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduScanner.java M java/kudu-test-utils/src/main/java/org/apache/kudu/test/RandomUtils.java 2 files changed, 32 insertions(+), 14 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/95/13495/1 -- To view, visit http://gerrit.cloudera.org:8080/13495 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iadb46e5dae71724aa8ff88d04c40ef4eaf1ddd2a Gerrit-Change-Number: 13495 Gerrit-PatchSet: 1 Gerrit-Owner: Will Berkeley <wdberke...@gmail.com>