addStorageServer was advancing tags too much because of read errors

This commit is contained in:
Evan Tschannen 2018-02-21 17:05:39 -08:00
parent 310f56d98a
commit 2aa273df96

View File

@ -719,9 +719,11 @@ ACTOR Future<std::pair<Version, Tag>> addStorageServer( Database cx, StorageServ
if(e.code() == error_code_commit_unknown_result)
throw recruitment_failed(); // There is a remote possibility that we successfully added ourselves and then someone removed us, so we have to fail
Void _ = wait( tr.onError(e) );
if(e.code() == error_code_not_committed) {
maxSkipTags = std::min<int>(maxSkipTags * SERVER_KNOBS->SKIP_TAGS_GROWTH_RATE, SERVER_KNOBS->MAX_SKIP_TAGS);
}
maxSkipTags = std::min<int>(maxSkipTags * SERVER_KNOBS->SKIP_TAGS_GROWTH_RATE, SERVER_KNOBS->MAX_SKIP_TAGS);
Void _ = wait( tr.onError(e) );
}
}
}