-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 1.12.0
-
Component/s: Read and Write Concern
-
None
The new API for creating write concerns (added in v1.12.0) only includes a single way to create a write concern with w:majority: the writeconcern.Majority convenience function. If users want to define a write concern literal for w:majority, ..., they have to define their own string:
j := true
writeConcern := writeconcern.WriteConcern{
W: "majority",
Journal: &j,
}
or use the Majority function to get the "w" field:
writeConcern := &writeconcern.WriteConcern{ W: writeconcern.Majority().W, Journal: writeconcern.Journaled().Journal, }
Definition of done:
- Create a way to define a write concern literal for w:majority, ... without using a literal string or the Majority function.
- is related to
-
GODRIVER-2953 Make setting journaled=true on a write concern easier
- In Progress