diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-08-14 10:50:21 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-08-22 14:23:15 -0400 |
commit | 5df9e94b0c4840680d1d17fcf2f04412cf6d70cf (patch) | |
tree | cedc2c0f71cc0545ae9c524bce65f4c2ecfa5c4c /buildscripts/resmokelib | |
parent | bce25d5e123843c0e594d6d743981099f236c983 (diff) | |
download | mongo-5df9e94b0c4840680d1d17fcf2f04412cf6d70cf.tar.gz |
SERVER-33248 Allow choosing a sync source that we are up to date with if it has a higher lastOpCommitted
(cherry picked from commit f5e7c8f3e81fe0cd34d4952ed2b547f3c29e06a4)
Diffstat (limited to 'buildscripts/resmokelib')
-rw-r--r-- | buildscripts/resmokelib/testing/fixtures/replicaset.py | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/buildscripts/resmokelib/testing/fixtures/replicaset.py b/buildscripts/resmokelib/testing/fixtures/replicaset.py index 437037e88b9..b1966e4ed59 100644 --- a/buildscripts/resmokelib/testing/fixtures/replicaset.py +++ b/buildscripts/resmokelib/testing/fixtures/replicaset.py @@ -272,21 +272,13 @@ class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-inst primary_client = self.nodes[0].mongo_client() self.auth(primary_client, self.auth_options) - # Algorithm precondition: All nodes must be in primary/secondary state. - # - # 1) Perform a majority write. This will guarantee the primary updates its commit point - # to the value of this write. - # - # 2) Perform a second write. This will guarantee that all nodes will update their commit - # point to a time that is >= the previous write. That will trigger a stable checkpoint - # on all nodes. - # TODO(SERVER-33248): Remove this block. We should not need to prod the replica set to - # advance the commit point if the commit point being lagged is sufficient to choose a - # sync source. + # All nodes must be in primary/secondary state prior to this point. Perform a majority + # write to ensure there is a committed operation on the set. The commit point will + # propagate to all members and trigger a stable checkpoint on all persisted storage engines + # nodes. admin = primary_client.get_database( "admin", write_concern=pymongo.write_concern.WriteConcern(w="majority")) - admin.command("appendOplogNote", data={"await_stable_checkpoint": 1}) - admin.command("appendOplogNote", data={"await_stable_checkpoint": 2}) + admin.command("appendOplogNote", data={"await_stable_recovery_timestamp": 1}) for node in self.nodes: self.logger.info("Waiting for node on port %d to have a stable checkpoint.", node.port) |