We allow doing writes directly to secondaries if the writes are on the "local" db as this is not replicated.
When changing the default write concern to "majority", on writing to "local" on secondaries the write concern will be set to "majority" and nothing is preventing the code from waiting for this write-concern from being met.
1- So we need to add logic from preventing waiting for write-concern if we are writing to "local" db
2- add testing logic to cover it.
- is duplicated by
-
SERVER-61790 Inserting to custom collection in "local" database on secondary yields writeConcernError with PrimarySteppedDown(189)
- Closed
- is related to
-
SERVER-59077 Investigate: should we allow explicit writeConcern while writing to "local" db
- Closed