# Copyright (C) 2019-present MongoDB, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the Server Side Public License, version 1, # as published by MongoDB, Inc. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Server Side Public License for more details. # # You should have received a copy of the Server Side Public License # along with this program. If not, see # . # # As a special exception, the copyright holders give permission to link the # code of portions of this program with the OpenSSL library under certain # conditions as described in each individual source file and distribute # linked combinations including the program with the OpenSSL library. You # must comply with the Server Side Public License in all respects for # all of the code used other than as permitted herein. If you modify file(s) # with this exception, you may extend this exception to your version of the # file(s), but you are not obligated to do so. If you do not wish to do so, # delete this exception statement from your version. If you delete this # exception statement from all source files in the program, then also delete # it in the license file. # global: cpp_namespace: "mongo::repl" cpp_includes: - "mongo/db/repl/member_config.h" - "mongo/db/repl/repl_set_config_validators.h" - "mongo/db/repl/repl_set_tag.h" - "mongo/db/repl/repl_set_write_concern_mode_definitions.h" - "mongo/util/string_map.h" imports: - "mongo/db/basic_types.idl" - "mongo/util/net/hostandport.idl" - "mongo/db/repl/replication_types.idl" - "mongo/db/repl/member_config.idl" - "mongo/db/write_concern_options.idl" types: smallExactInt64: bson_serialization_type: any description: "Accepts any numerical type within int64 range. Serializes as NumberInt if it fits in an int32, NumberLong otherwise. Rejects decimals and doubles that are not integer values." cpp_type: std::int64_t serializer: ::smallExactInt64Append deserializer: ::parseSmallExactInt64 termType: bson_serialization_type: any description: "Same as smallExactInt64, only is only serialized if not -1." cpp_type: std::int64_t serializer: ::serializeTermField deserializer: ::parseSmallExactInt64 optionalBoolSerializeIfTrue: bson_serialization_type: any description: "Same as optionalBool, except only written if true." cpp_type: "mongo::OptionalBool" default: "mongo::OptionalBool()" deserializer: "mongo::OptionalBool::parseFromBSON" serializer: "::serializeOptionalBoolIfTrue" replSetWriteConcernModeMap: bson_serialization_type: any description: "A BSON object mapping write concern mode names to tag sets" cpp_type: ReplSetWriteConcernModeDefinitions serializer: ReplSetWriteConcernModeDefinitions::serializeToBSON deserializer: ReplSetWriteConcernModeDefinitions::parseFromBSON structs: ReplSetConfigSettings: description: "The configuration options that apply to the whole replica set" strict: false fields: chainingAllowed: type: safeBool default: true description: "When true, the replica set allows secondary members to replicate from other secondary members. When false, secondaries can replicate only from the primary." heartbeatIntervalMillis: type: smallExactInt64 default: 2000 description: "The frequency in milliseconds of the heartbeats" validator: { gt: 0 } heartbeatTimeoutSecs: type: smallExactInt64 default: 10 description: "Number of seconds that the replica set members wait for a successful heartbeat from each other" validator: { gt: 0 } electionTimeoutMillis: type: smallExactInt64 default: 10000 description: "The time limit in milliseconds for detecting when a replica set’s primary is unreachable" validator: { gt: 0 } catchUpTimeoutMillis: type: smallExactInt64 default: -1 description: "Time limit in milliseconds for a newly elected primary to sync (catch up) with the other replica set members that may have more recent writes. If timeout is -1, infinite catchup time. If timeout is 0, newly elected primaries will not attempt to catch up" validator: { gte: -1 } catchUpTakeoverDelayMillis: type: smallExactInt64 default: 30000 description: "Time in milliseconds a node waits to initiate a catchup takeover after determining it is ahead of the current primary. -1 disables catchup takeover" validator: { gte: -1 } getLastErrorModes: type: replSetWriteConcernModeMap default: ReplSetWriteConcernModeDefinitions() getLastErrorDefaults: cpp_name: defaultWriteConcern type: WriteConcern default: WriteConcernOptions() validator: { callback: "validateDefaultWriteConcernHasMember"} replicaSetId: type: objectid optional: true validator: { callback: "validateReplicaSetIdNotNull"} ReplSetConfigBase: description: "The complete configuration for the replica set" fields: _id: cpp_name: replSetName type: string description: "The name of the replica set. Once set, you cannot change the name of a replica set" validator: { callback: "validateReplSetNameNonEmpty"} version: cpp_name: configVersion type: smallExactInt64 description: "An incrementing number used to distinguish revisions of the replica set configuration object from previous iterations of the configuration" validator: { gt: 0, lt: 2147483648 } term: cpp_name: configTerm type: termType description: "The configuration term is the term of the primary that originally created this configuration. Configurations in a replica set are totally ordered by their term and configuration version." default: -1 validator: { gte: -1, lt: 2147483648 } members: type: array description: "An array of member configuration documents, one for each member of the replica set" configsvr: cpp_name: configServer type: optionalBoolSerializeIfTrue description: "Indicates whether the replica set is used for a sharded cluster’s config servers. Set to true if the replica set is for a sharded cluster’s config servers" protocolVersion: description: "Election protocol version. Always 1, as PV0 is no longer supported" type: safeInt64 default: 1 validator: { gte: 1, lte: 1 } writeConcernMajorityJournalDefault: cpp_name: writeConcernMajorityShouldJournal description: >- Determines the behavior of { w: "majority" } write concern if the write concern does not explicitly specify the journal option j type: safeBool default: true settings: description: "A document that contains configuration options that apply to the whole replica set." type: ReplSetConfigSettings optional: true repaired: description: "This field indicates the replicated data has been repaired, and prevents use of the configuration until it is removed." type: optionalBool recipientConfig: description: "An optional field representing a config for a recipient during a shard split operation. Due to compiler support issues, the type is set to any." type: any ignore: true