[SERVER-14465] Default write concern based on configuration (w:default) Created: 04/Jul/14  Updated: 06/Dec/22  Resolved: 07/Mar/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Charlie Page Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-14708 A mixed single node & replicaset set ... Closed
Assigned Teams:
Replication
Participants:

 Description   

Have a new write concern w:default, which is based on the configuration. Drives would specify this and the server would determine what this means. Having a default write concern that is concrete forces w:1 to account for standalones. This would allow for a more intuitive write concern depending on the MongoDB configuration (not the current state of that configuration).

w:default would translate to:

Standalone w:1
Replica set w/ arbiter w:1
Replica set w/o arbiter w:majority

The argument could be made for Replica w/ arbiter to be half of the number of data bearing nodes as this is static with config too.



 Comments   
Comment by Gregory McKeon (Inactive) [ 07/Mar/19 ]

You should configure your drivers to set a default writeConcern.

Comment by Charlie Page [ 04/Jul/14 ]

I agree that w:majority already exists, but the default is w:1 with a replica set when drivers connect.

Comment by Andy Schwerin [ 04/Jul/14 ]

I believe w: majority serves this purpose today.

Generated at Thu Feb 08 03:34:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.