From b74f90afc1164e0357c5649659aeed345b5f4fcd Mon Sep 17 00:00:00 2001 From: Robert Guo Date: Tue, 13 Dec 2016 12:11:29 -0500 Subject: SERVER-26806 randomly restart initial sync --- buildscripts/resmokelib/testing/hooks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/buildscripts/resmokelib/testing/hooks.py b/buildscripts/resmokelib/testing/hooks.py index 4fc187f9caf..2ad6b1b3990 100644 --- a/buildscripts/resmokelib/testing/hooks.py +++ b/buildscripts/resmokelib/testing/hooks.py @@ -253,11 +253,11 @@ class BackgroundInitialSync(JsCustomBehavior): test.short_name()) # If we have not restarted initial sync since the last time we ran the data - # validation, and if we're using resync for restarts, restart initial sync with a - # 20% probability. - if self.random_restarts < 1 and self.use_resync and random.random() < 0.2: - self.fixture.logger.info( - "Calling resync randomly in the middle of initial sync") + # validation, restart initial sync with a 20% probability. + if self.random_restarts < 1 and random.random() < 0.2: + hook_type = "resync" if self.use_resync else "initial sync" + self.fixture.logger.info("randomly restarting " + hook_type + + " in the middle of " + hook_type) restart_init_sync() self.random_restarts += 1 return -- cgit v1.2.1