Koskamo

Write concerns for durable writes

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

Write concern describes the level of acknowledgment requested from MongoDB for write operations to a standalone mongod, replica sets, or sharded clusters; in sharded clusters, mongos passes the write concern to the shards. For multi-document transactions, set the write concern at the transaction level and do not explicitly set it for individual write operations in the transaction. Replica sets and sharded clusters support a global default write concern — majority by default, configurable via setDefaultRWConcern, which requires a w field value — and operations without an explicit write concern inherit that default. The specification takes three fields: w requests acknowledgment that the write propagated to a specified number of mongod instances or instances with specified tags; j requests acknowledgment that the write has been written to the on-disk journal; wtimeout sets a time limit to prevent writes from blocking indefinitely. With w: "majority", the calculated majority of data-bearing voting members (the primary plus secondaries with votes greater than 0) must durably write the change to their local oplogs, and it is the default write concern for most MongoDB deployments. Scope: MongoDB. Reviewed October 4, 2026.

Source and provenance

Original source
www.mongodb.com
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.