Skip to content

CDRIVER-5304 set cluster time in test sessions #2008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kevinAlbs
Copy link
Collaborator

Summary

Implement test changes described in DRIVERS-2816 to fix test failures:

Modify the unified test runner to collect the cluster time from the internal MongoClient following initialData operations, and use it to advance cluster times of all session entities created during the subsequent test

This change appears to fix ongoing failures for the client bulkWrite in a transaction test (example):

test file: client bulkWrite transactions
[...]
running test: client bulkWrite in a transaction
[...]
 error: expected result, but got error: Transaction 39dbb2a4-d1db-4913-bdbe-dec0b3056a91 - Il1bctjvfYRA0JpLUY4Xle2E6bw+KM1YpMr4x52qGgE= -  - :1 was aborted on statement 0 due to: a non-retryable snapshot error :: caused by :: Encountered error from localhost:27217 during a transaction :: caused by :: Database transaction-tests has undergone a catalog change operation at time Timestamp(1746646537, 68) and no longer satisfies the requirements for the current transaction which requires Timestamp(1746646537,

Tested with this patch build: https://spruce.mongodb.com/version/681cc957c6aad7000796aac0

Motivation

Quoting DRIVERS-2816:

SERVER-82353 addressed a correctness issue for sharded clusters, which requires gossipping the cluster time between mongos hsots (particularly the server used to create collections and other(s) used to execute transactions) in order to avoid a MigrationConflict error.

@kevinAlbs kevinAlbs changed the title CDRIVER-5304 Gossip cluster time from internal MongoClient to session entities CDRIVER-5304 set cluster time in test sessions May 8, 2025
@kevinAlbs kevinAlbs marked this pull request as ready for review May 8, 2025 17:16
@kevinAlbs kevinAlbs requested a review from a team as a code owner May 8, 2025 17:16
@kevinAlbs kevinAlbs requested a review from mdb-ad May 8, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant