SERVER-115225: Change the cluster time we use for validate hook (#45073)

GitOrigin-RevId: 888b400e5f787d119e1af1ad128d7b580e9fb785
This commit is contained in:
seanzimm 2025-12-10 14:19:00 -05:00 committed by MongoDB Bot
parent 8353910834
commit 6ecd5d2cbd
1 changed files with 2 additions and 9 deletions

View File

@ -1165,17 +1165,10 @@ class ReplicaSetFixture(interface.ReplFixture, interface._DockerComposeInterface
coll = primary_client["test"]["validate.hook"].with_options(
write_concern=pymongo.write_concern.WriteConcern(w=len(self.nodes))
)
coll.insert_one({"a": 1})
res = primary_client.test.command({"insert": "validate.hook", "documents": [{"a": 1}]})
clusterTime = res["opTime"]["ts"]
coll.drop()
res = primary_client.admin.command({"replSetGetStatus": 1})
if "appliedOpTime" not in res["optimes"]:
# This can be null when the node is starting up.
return False
clusterTime = res["optimes"]["appliedOpTime"]["ts"]
self.logger.info("Performing Internode Validation")
# Collections we exclude from the hash comparisons. This is because these collections can contain different document contents for valid reasons (i.e. implicitly replicated, TTL indexes, updated by background threads, etc)