summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Nadeau <didier.nadeau@mongodb.com>2022-11-28 19:46:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-28 20:26:21 +0000
commit86517ad2a71ae175b9865bb52874044ceba26aba (patch)
tree68f3e64218dfad66a36c199ef9a63feb60af5528
parent507288cdeed26adbdab4eccd66cb48b73d96559e (diff)
downloadmongo-86517ad2a71ae175b9865bb52874044ceba26aba.tar.gz
SERVER-70911 Document --serverless parameter in architecture guide
-rw-r--r--src/mongo/db/serverless/README.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/serverless/README.md b/src/mongo/db/serverless/README.md
index aa077cd2877..14f71825835 100644
--- a/src/mongo/db/serverless/README.md
+++ b/src/mongo/db/serverless/README.md
@@ -66,6 +66,11 @@ This so-called “serverless operation lock” is acquired the first time a stat
### Cleanup
Once a shard slit operation has completed it will return either [CommandFailed](https://github.com/mongodb/mongo/blob/1c4fafd4ae5c082f36a8af1442aa48174962b1b4/src/mongo/db/serverless/shard_split_commands.cpp#L166-L169) (if the operation was aborted for any reason), or [TenantMigrationCommitted](https://github.com/mongodb/mongo/blob/1c4fafd4ae5c082f36a8af1442aa48174962b1b4/src/mongo/db/serverless/shard_split_commands.cpp#L171-L173) (if the operation succeeded). At this point it is the caller’s responsibility to take any necessary post-operation actions (such as updating routing tables), before calling `forgetShardSplit` on the donor primary. Calling this command will cause the donor primary to mark the operation garbage-collectable, by [setting the expireAt field in the operation state document](https://github.com/mongodb/mongo/blob/1c4fafd4ae5c082f36a8af1442aa48174962b1b4/src/mongo/db/serverless/shard_split_donor_service.cpp#L1140-L1141) to a configurable timeout called `repl::shardSplitGarbageCollectionDelayMS` with a [default value of 15 minutes](https://github.com/mongodb/mongo/blob/1c4fafd4ae5c082f36a8af1442aa48174962b1b4/src/mongo/db/repl/repl_server_parameters.idl#L688-L696). The operation will wait for the delay and then [delete the state document](https://github.com/mongodb/mongo/blob/1c4fafd4ae5c082f36a8af1442aa48174962b1b4/src/mongo/db/serverless/shard_split_donor_service.cpp#L1186), which in turn removes access blockers installed for the operation. It is now the responsibility of the caller to remove orphaned data on the donor and recipient.
+## Serverless server parameter
+The [replication.serverless](https://github.com/10gen/mongo/blob/e75a51a7dcbe842e07a24343438706d865de96dc/src/mongo/db/mongod_options_replication.idl#L77) server parameter allows starting a mongod without providing a replica set name. It cannot be used at the same time as [replication.replSet](https://github.com/10gen/mongo/blob/e75a51a7dcbe842e07a24343438706d865de96dc/src/mongo/db/mongod_options_replication.idl#L64) or [replication.replSetName](https://github.com/10gen/mongo/blob/e75a51a7dcbe842e07a24343438706d865de96dc/src/mongo/db/mongod_options_replication.idl#L70). When `replication.serverless` is used, the replica set name is learned through [replSetInitiate](https://www.mongodb.com/docs/manual/reference/command/replSetInitiate/) or [through an hearbeat](https://github.com/10gen/mongo/blob/e75a51a7dcbe842e07a24343438706d865de96dc/src/mongo/db/repl/replication_coordinator_impl.cpp#L5848) from another mongod. Mongod can only learn its replica set name once.
+
+Using `replication.serverless` also enables a node to apply a recipient config to join a new recipient set as part of a split.
+
## Glossary
**recipient config**
The config for the recipient replica set.