Majority
Requests acknowledgement from the majority of data-bearing members, as well as requesting that the write is written to the journal.
Use this write concern for requests where the result is important and shouldn't be lost. Note that some data may still be rolled back, see writeToJournal.
Example
collections.updateMany(
options = {
writeConcern(WriteConcern.Majority)
}
) {
User::age inc 1
}
Content copied to clipboard
See also
Specify this option.