Skip to content

CSHARP-3547: CSOT: read-write concern #1752

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

Merged
merged 1 commit into from
Aug 13, 2025
Merged

Conversation

sanych-sun
Copy link
Member

No description provided.

@sanych-sun sanych-sun requested a review from a team as a code owner August 11, 2025 18:27
Copy link
Contributor

@rstam rstam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

var subject = new CreateCollectionOperation(_collectionNamespace, _messageEncoderSettings)
{
WriteConcern = writeConcern
};
var operationContext = hasOperationTimeout ? new OperationContext(TimeSpan.FromSeconds(42), CancellationToken.None) : OperationContext.NoTimeout;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed you used this 42 magic number for setting the operation timeout when we need. Should we extract this into a constant that can be used across all the tests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not think so 🤣, 42 - does not have any special meaning =) Other then it is "answer to the ultimate question of life, the universe, and everything". It could be any number, simply not-zero timeout.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was suggesting extracting this to a constant so that if we need to change this value in the future, we'll only need to update it in one place rather than hunting down and replacing all instances of the magic number 42 throughout the codebase. But I don't insist, up to you.

@sanych-sun sanych-sun merged commit 25cd545 into mongodb:main Aug 13, 2025
36 checks passed
@sanych-sun sanych-sun deleted the csharp3547 branch August 13, 2025 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants