summaryrefslogtreecommitdiff
path: root/src/mongo/db/write_concern_options.idl
diff options
context:
space:
mode:
authorMatt Broadstone <mbroadst@mongodb.com>2022-03-16 22:35:38 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-17 18:02:03 +0000
commitcc774a291b08216b01eb14ad57fd40b8899b6532 (patch)
treeb9eb68ac3b25eea23a16a45a139c82e5240cb361 /src/mongo/db/write_concern_options.idl
parent1fe77b5bd9fb13f9eb74275359dcc4ba69f2d5e9 (diff)
downloadmongo-cc774a291b08216b01eb14ad57fd40b8899b6532.tar.gz
SERVER-64577: Disallow wTags write concern in FCV less than 5.3
also fixes SERVER-63100
Diffstat (limited to 'src/mongo/db/write_concern_options.idl')
-rw-r--r--src/mongo/db/write_concern_options.idl62
1 files changed, 61 insertions, 1 deletions
diff --git a/src/mongo/db/write_concern_options.idl b/src/mongo/db/write_concern_options.idl
index 07c3cdbffc4..8f9c595f24e 100644
--- a/src/mongo/db/write_concern_options.idl
+++ b/src/mongo/db/write_concern_options.idl
@@ -33,7 +33,7 @@ global:
imports:
- "mongo/idl/basic_types.idl"
-
+ - "mongo/db/read_write_concern_provenance_base.idl"
types:
WriteConcern:
@@ -42,3 +42,63 @@ types:
cpp_type: "mongo::WriteConcernOptions"
serializer: "mongo::WriteConcernOptions::toBSON"
deserializer: "mongo::WriteConcernOptions::deserializerForIDL"
+
+ writeConcernW:
+ bson_serialization_type: any
+ description: >-
+ A string or integer representing the 'w' option in a document specifying write concern.
+ See https://docs.mongodb.com/manual/reference/write-concern/"
+ cpp_type: "mongo::WriteConcernW"
+ serializer: "::mongo::serializeWriteConcernW"
+ deserializer: "::mongo::deserializeWriteConcernW"
+
+ writeConcernWTimeout:
+ bson_serialization_type: any
+ description: >-
+ An integer representing the 'wtimeout' option in a document specifying write concern.
+ See https://docs.mongodb.com/manual/reference/write-concern/"
+ cpp_type: std::int64_t
+ deserializer: "::mongo::parseWTimeoutFromBSON"
+
+structs:
+ WriteConcernIdl:
+ description: "WriteConcern object parser"
+ strict: true
+ fields:
+ w:
+ type: writeConcernW
+ cpp_name: writeConcernW
+ optional: true
+ unstable: false
+ j:
+ type: safeBool
+ optional: true
+ unstable: false
+ wtimeout:
+ type: writeConcernWTimeout
+ default: 0
+ unstable: false
+ fsync:
+ type: safeBool
+ optional: true
+ unstable: false
+ # Fields with names wElectionId, wOpTime, and getLastError are accepted in the WriteConcern document for
+ # backwards-compatibility reasons, but their values are entirely ignored.
+ wElectionId:
+ type: any
+ ignore: true
+ unstable: false
+ wOpTime:
+ type: any
+ ignore: true
+ unstable: false
+ getLastError:
+ type: any
+ ignore: true
+ unstable: false
+ provenance:
+ description: "The source for this provenance"
+ cpp_name: source
+ type: ReadWriteConcernProvenanceSource
+ optional: true
+ unstable: false