Skip to content

Conversation

rozza
Copy link
Member

@rozza rozza commented Apr 30, 2025

…able.

SPARK-392

@rozza rozza requested review from a team and stIncMale and removed request for a team April 30, 2025 09:45
Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

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

There is one optional suggestion, feel free to ignore.

WriteConcern writeConcern = WriteConcern.ACKNOWLEDGED;
WriteConcern writeConcern = getConnectionString().getWriteConcern();
if (writeConcern == null) {
writeConcern = WriteConcern.ACKNOWLEDGED;
Copy link
Member

Choose a reason for hiding this comment

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

[optional]

To make it obvious for a code reader that the default write concern is the same as that in the MongoClientSettings, we could write MongoClientSettings.builder().build().getWriteConcern() instead of WriteConcern.ACKNOWLEDGED.

We may further document on WriteConfig.WRITE_CONCERN_W_CONFIG that the default write concern is the same as the one used by MongoClientSettings, which is WriteConcern.ACKNOWLEDGED.

@rozza rozza merged commit ac4cc36 into mongodb:main May 1, 2025
24 checks passed
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.

2 participants