reftable: don't check deadline on the first try

This helps debug stepping.

Change-Id: I020dafab4ffac75e6df0dbcde0ed4805c7867f72
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
This commit is contained in:
Han-Wen Nienhuys 2020-01-29 19:12:06 +01:00 committed by Matthias Sohn
parent 936a031ca3
commit 79266a1fe5
1 changed files with 6 additions and 1 deletions

View File

@ -262,8 +262,13 @@ void reload() throws IOException {
long max = 1000;
long delay = 0;
boolean success = false;
while (System.currentTimeMillis() < deadline) {
// Don't check deadline for the first 3 retries, so we can step with a
// debugger without worrying about deadlines.
int tries = 0;
while (tries < 3 || System.currentTimeMillis() < deadline) {
List<String> names = readTableNames();
tries++;
try {
reloadOnce(names);
success = true;