From e50bb6c41ae8eb190579d44c5ff95c99e8c96123 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Tue, 17 Aug 2021 17:13:03 -0400 Subject: [PATCH] (DOCS-13786): Report the shard name of owning shard for split and merge ops --- source/reference/command/mergeChunks.txt | 2 +- source/reference/config-database.txt | 3 ++- source/release-notes/5.0.txt | 16 +++++++++++++++- .../tutorial/split-chunks-in-sharded-cluster.txt | 4 +++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/source/reference/command/mergeChunks.txt b/source/reference/command/mergeChunks.txt index 50313d08c96..efba3cb0ebe 100644 --- a/source/reference/command/mergeChunks.txt +++ b/source/reference/command/mergeChunks.txt @@ -110,7 +110,7 @@ satisfied. Return Messages --------------- -On success, :dbcommand:`mergeChunks` returns to following document: +On success, :dbcommand:`mergeChunks` returns this document: .. code-block:: javascript diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index 97fb3ca536f..e733bc179f1 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -136,7 +136,8 @@ to support sharding: }, "lastmod" : Timestamp(1000, 2), "lastmodEpoch" : ObjectId("<...>") - } + }, + "owningShard" : "" } } diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index a8aed937f54..76112e19653 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -501,6 +501,20 @@ Starting in MongoDB 5.0, when using the :dbcommand:`movePrimary` command to remove a shard from a :ref:`sharded cluster `, writes to the original shard will generate an error message. +Split and Merge Chunk Changelogs Show Owning Shard +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting in MongoDB 5.0, documents in the :data:`config.changelog` +collection for +:manual:`split ` and +:manual:`merge ` operations +contain an ``owningShard`` field. The ``owningShard`` field shows the +``shardId`` of the shard that owns the chunks that were split or +merged. + +The ``owningShard`` field helps identify shards where split or merge +operations frequently occur. + .. _5.0-rel-notes-shell: Shell Changes @@ -674,7 +688,7 @@ memory usage for the :dbcommand:`validate` command. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Starting in MongoDB 5.0, you can use the -:parameter:`findChunksOnConfigTimeoutMS` parameter to change the timout +:parameter:`findChunksOnConfigTimeoutMS` parameter to change the timeout for find operations on :data:`~config.chunks`. Database Profiler ``filter`` Option diff --git a/source/tutorial/split-chunks-in-sharded-cluster.txt b/source/tutorial/split-chunks-in-sharded-cluster.txt index 264df5e2657..18c1f855ccc 100644 --- a/source/tutorial/split-chunks-in-sharded-cluster.txt +++ b/source/tutorial/split-chunks-in-sharded-cluster.txt @@ -75,7 +75,9 @@ document as the lower bound in the new chunk: sh.splitAt( "records.people", { "zipcode": "63109" } ) -.. note:: :method:`~sh.splitAt()` does not necessarily split the chunk +.. note:: + + :method:`~sh.splitAt()` does not necessarily split the chunk into two equally sized chunks. The split occurs at the location of the document matching the query, regardless of where that document is in the chunk.