<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:12:41 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-69142] A retry of _shardsvrReshardCollection can cause DuplicateKey error (resharding_nonblocking_coordinator_rebuild.js)</title>
                <link>https://jira.mongodb.org/browse/SERVER-69142</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Per the following &lt;a href=&quot;https://evergreen.mongodb.com/lobster/build/2ee5511b744d8feb8f8dbe95ddb62f1d/test/62fac9d8f966b7d461337dfd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;logs&lt;/a&gt; in the failing test:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[js_test:resharding_nonblocking_coordinator_rebuild] c20779| 2022-08-15T22:34:31.656+00:00 W  CONTROL  23829   [conn1] &quot;Set failpoint&quot;,&quot;attr&quot;:{&quot;failPointName&quot;:&quot;reshardingPauseCoordinatorBeforeCompletion&quot;,&quot;failPoint&quot;:{&quot;mode&quot;:0,&quot;data&quot;:{},&quot;timesEntered&quot;:0}}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[js_test:resharding_nonblocking_coordinator_rebuild] c20779| 2022-08-15T22:34:33.138+00:00 I  RESHARD  4956902 [ReshardingCoordinatorService-0] &quot;Resharding failed&quot;,&quot;attr&quot;:{&quot;namespace&quot;:&quot;reshardingDb.coll&quot;,&quot;newShardKeyPattern&quot;:{&quot;newKey&quot;:1},&quot;error&quot;:{&quot;code&quot;:5356800,&quot;codeName&quot;:&quot;Location5356800&quot;,&quot;errmsg&quot;:&quot;Recipient shard shard2-recipient0 reached an unrecoverable error :: caused by :: Resharding completed with non-empty stash collections&quot;}}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;..&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;..&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[js_test:resharding_nonblocking_coordinator_rebuild] c20779| 2022-08-15T22:34:34.792+00:00 I  RESHARD  5343001 [ReshardingCoordinatorService-1] &quot;Transitioned resharding coordinator state&quot;,&quot;attr&quot;:{&quot;newState&quot;:&quot;initializing&quot;,&quot;oldState&quot;:&quot;unused&quot;,&quot;namespace&quot;:&quot;reshardingDb.coll&quot;,&quot;collectionUUID&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;98d3baa8-562a-4c71-8156-8cb71202bc58&quot;}},&quot;reshardingUUID&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;afc0b895-e087-436d-a9d8-b141ea128266&quot;}}}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;..&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;..&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[js_test:resharding_nonblocking_coordinator_rebuild] d20770| 2022-08-15T22:34:37.057+00:00 I  COMMAND  51803   [conn64] &quot;Slow query&quot;,&quot;attr&quot;:{&quot;type&quot;:&quot;command&quot;,&quot;ns&quot;:&quot;admin.$cmd&quot;,&quot;appName&quot;:&quot;MongoDB Shell&quot;,&quot;command&quot;:{&quot;_shardsvrReshardCollection&quot;:&quot;reshardingDb.coll&quot;,&quot;key&quot;:{&quot;newKey&quot;:1},&quot;_presetReshardedChunks&quot;:[{&quot;recipientShardId&quot;:&quot;shard2-recipient0&quot;,&quot;min&quot;:{&quot;newKey&quot;:{&quot;$minKey&quot;:1}},&quot;max&quot;:{&quot;newKey&quot;:{&quot;$maxKey&quot;:1}}}],&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:60000},&quot;databaseVersion&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;76d42834-8a2e-4942-bc32-d520dae1731c&quot;},&quot;timestamp&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602860,&quot;i&quot;:3}},&quot;lastMod&quot;:1},&quot;lsid&quot;:{&quot;id&quot;:{&quot;$uuid&quot;:&quot;62f0a515-4f10-4caa-844c-a07714eadb7c&quot;},&quot;uid&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;u4nTF1+wmByGgmwndZCCo3FgRx9gUEtGEkFRhsYwq3A=&quot;,&quot;subType&quot;:&quot;0&quot;}}},&quot;$clusterTime&quot;:{&quot;clusterTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602870,&quot;i&quot;:25}},&quot;signature&quot;:{&quot;hash&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;AAAAAAAAAAAAAAAAAAAAAAAAAAA=&quot;,&quot;subType&quot;:&quot;0&quot;}},&quot;keyId&quot;:0}},&quot;$configTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602870,&quot;i&quot;:24}},&quot;$topologyTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602860,&quot;i&quot;:1}},&quot;$audit&quot;:{&quot;$impersonatedUsers&quot;:[{&quot;user&quot;:&quot;__system&quot;,&quot;db&quot;:&quot;local&quot;}],&quot;$impersonatedRoles&quot;:[]},&quot;$client&quot;:{&quot;application&quot;:{&quot;name&quot;:&quot;MongoDB Shell&quot;,&quot;pid&quot;:&quot;32822&quot;},&quot;driver&quot;:{&quot;name&quot;:&quot;MongoDB Internal Client&quot;,&quot;version&quot;:&quot;5.0.11-6-ga2642ba&quot;},&quot;os&quot;:{&quot;type&quot;:&quot;Linux&quot;,&quot;name&quot;:&quot;Ubuntu&quot;,&quot;architecture&quot;:&quot;x86_64&quot;,&quot;version&quot;:&quot;18.04&quot;},&quot;mongos&quot;:{&quot;host&quot;:&quot;ip-10-128-0-163:20782&quot;,&quot;client&quot;:&quot;10.128.0.163:49632&quot;,&quot;version&quot;:&quot;5.0.11-6-ga2642ba&quot;}},&quot;$configServerState&quot;:{&quot;opTime&quot;:{&quot;ts&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602870,&quot;i&quot;:24}},&quot;t&quot;:-1}},&quot;$db&quot;:&quot;admin&quot;},&quot;numYields&quot;:0,&quot;ok&quot;:0,&quot;errMsg&quot;:&quot;Recipient shard shard2-recipient0 reached an unrecoverable error :: caused by :: E11000 duplicate key error collection: reshardingDb.system.resharding.98d3baa8-562a-4c71-8156-8cb71202bc58 index: _id_ dup key: { _id: 0.0 }&quot;,&quot;errName&quot;:&quot;DuplicateKey&quot;,&quot;errCode&quot;:11000,&quot;reslen&quot;:682,&quot;locks&quot;:{&quot;ParallelBatchWriterMode&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;FeatureCompatibilityVersion&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;ReplicationStateTransition&quot;:{&quot;acquireCount&quot;:{&quot;w&quot;:1}},&quot;Global&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;Database&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;Mutex&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}}},&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:60000,&quot;provenance&quot;:&quot;clientSupplied&quot;},&quot;remote&quot;:&quot;10.128.0.163:44006&quot;,&quot;protocol&quot;:&quot;op_msg&quot;,&quot;durationMillis&quot;:2359}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;It can be seen that the first &lt;tt&gt;_configsvrReshardCollection&lt;/tt&gt; command fails as it is supposed to with code 5356800 during oplog application. However a subsequent retry of the same command after the first one finishes causes DuplicateKey (11000) due to the global id constraint violation found in cloning phase for second reshard collection command rather than in oplog application phase. From the following logs, it can be seen that it is the &#160;&lt;tt&gt;_shardsvrReshardCollection&lt;/tt&gt; command that is being retried, unlike BF-26040:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[js_test:resharding_nonblocking_coordinator_rebuild] d20770| 2022-08-15T22:34:30.663+00:00 I  COMMAND  51803   [conn64] &quot;Slow query&quot;,&quot;attr&quot;:{&quot;type&quot;:&quot;command&quot;,&quot;ns&quot;:&quot;admin.$cmd&quot;,&quot;appName&quot;:&quot;MongoDB Shell&quot;,&quot;command&quot;:{&quot;_shardsvrReshardCollection&quot;:&quot;reshardingDb.coll&quot;,&quot;key&quot;:{&quot;newKey&quot;:1},&quot;_presetReshardedChunks&quot;:[{&quot;recipientShardId&quot;:&quot;shard2-recipient0&quot;,&quot;min&quot;:{&quot;newKey&quot;:{&quot;$minKey&quot;:1}},&quot;max&quot;:{&quot;newKey&quot;:{&quot;$maxKey&quot;:1}}}],&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:60000},&quot;databaseVersion&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;76d42834-8a2e-4942-bc32-d520dae1731c&quot;},&quot;timestamp&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602860,&quot;i&quot;:3}},&quot;lastMod&quot;:1},&quot;lsid&quot;:{&quot;id&quot;:{&quot;$uuid&quot;:&quot;62f0a515-4f10-4caa-844c-a07714eadb7c&quot;},&quot;uid&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;u4nTF1+wmByGgmwndZCCo3FgRx9gUEtGEkFRhsYwq3A=&quot;,&quot;subType&quot;:&quot;0&quot;}}},&quot;$clusterTime&quot;:{&quot;clusterTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602862,&quot;i&quot;:29}},&quot;signature&quot;:{&quot;hash&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;AAAAAAAAAAAAAAAAAAAAAAAAAAA=&quot;,&quot;subType&quot;:&quot;0&quot;}},&quot;keyId&quot;:0}},&quot;$configTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602862,&quot;i&quot;:29}},&quot;$topologyTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602860,&quot;i&quot;:1}},&quot;$audit&quot;:{&quot;$impersonatedUsers&quot;:[{&quot;user&quot;:&quot;__system&quot;,&quot;db&quot;:&quot;local&quot;}],&quot;$impersonatedRoles&quot;:[]},&quot;$client&quot;:{&quot;application&quot;:{&quot;name&quot;:&quot;MongoDB Shell&quot;,&quot;pid&quot;:&quot;32822&quot;},&quot;driver&quot;:{&quot;name&quot;:&quot;MongoDB Internal Client&quot;,&quot;version&quot;:&quot;5.0.11-6-ga2642ba&quot;},&quot;os&quot;:{&quot;type&quot;:&quot;Linux&quot;,&quot;name&quot;:&quot;Ubuntu&quot;,&quot;architecture&quot;:&quot;x86_64&quot;,&quot;version&quot;:&quot;18.04&quot;},&quot;mongos&quot;:{&quot;host&quot;:&quot;ip-10-128-0-163:20782&quot;,&quot;client&quot;:&quot;10.128.0.163:49632&quot;,&quot;version&quot;:&quot;5.0.11-6-ga2642ba&quot;}},&quot;$configServerState&quot;:{&quot;opTime&quot;:{&quot;ts&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602862,&quot;i&quot;:29}},&quot;t&quot;:-1}},&quot;$db&quot;:&quot;admin&quot;},&quot;numYields&quot;:0,&quot;ok&quot;:0,&quot;errMsg&quot;:&quot;Not Primary when trying to create a new instance of PrimaryOnlyService ReshardingCoordinatorService&quot;,&quot;errName&quot;:&quot;NotWritablePrimary&quot;,&quot;errCode&quot;:10107,&quot;reslen&quot;:574,&quot;locks&quot;:{&quot;ParallelBatchWriterMode&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;FeatureCompatibilityVersion&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;ReplicationStateTransition&quot;:{&quot;acquireCount&quot;:{&quot;w&quot;:1}},&quot;Global&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;Database&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;Mutex&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}}},&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:60000,&quot;provenance&quot;:&quot;clientSupplied&quot;},&quot;remote&quot;:&quot;10.128.0.163:44006&quot;,&quot;protocol&quot;:&quot;op_msg&quot;,&quot;durationMillis&quot;:6497}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;...&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;[js_test:resharding_nonblocking_coordinator_rebuild] d20770| 2022-08-15T22:34:37.057+00:00 I  COMMAND  51803   [conn64] &quot;Slow query&quot;,&quot;attr&quot;:{&quot;type&quot;:&quot;command&quot;,&quot;ns&quot;:&quot;admin.$cmd&quot;,&quot;appName&quot;:&quot;MongoDB Shell&quot;,&quot;command&quot;:{&quot;_shardsvrReshardCollection&quot;:&quot;reshardingDb.coll&quot;,&quot;key&quot;:{&quot;newKey&quot;:1},&quot;_presetReshardedChunks&quot;:[{&quot;recipientShardId&quot;:&quot;shard2-recipient0&quot;,&quot;min&quot;:{&quot;newKey&quot;:{&quot;$minKey&quot;:1}},&quot;max&quot;:{&quot;newKey&quot;:{&quot;$maxKey&quot;:1}}}],&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:60000},&quot;databaseVersion&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;76d42834-8a2e-4942-bc32-d520dae1731c&quot;},&quot;timestamp&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602860,&quot;i&quot;:3}},&quot;lastMod&quot;:1},&quot;lsid&quot;:{&quot;id&quot;:{&quot;$uuid&quot;:&quot;62f0a515-4f10-4caa-844c-a07714eadb7c&quot;},&quot;uid&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;u4nTF1+wmByGgmwndZCCo3FgRx9gUEtGEkFRhsYwq3A=&quot;,&quot;subType&quot;:&quot;0&quot;}}},&quot;$clusterTime&quot;:{&quot;clusterTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602870,&quot;i&quot;:25}},&quot;signature&quot;:{&quot;hash&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;AAAAAAAAAAAAAAAAAAAAAAAAAAA=&quot;,&quot;subType&quot;:&quot;0&quot;}},&quot;keyId&quot;:0}},&quot;$configTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602870,&quot;i&quot;:24}},&quot;$topologyTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602860,&quot;i&quot;:1}},&quot;$audit&quot;:{&quot;$impersonatedUsers&quot;:[{&quot;user&quot;:&quot;__system&quot;,&quot;db&quot;:&quot;local&quot;}],&quot;$impersonatedRoles&quot;:[]},&quot;$client&quot;:{&quot;application&quot;:{&quot;name&quot;:&quot;MongoDB Shell&quot;,&quot;pid&quot;:&quot;32822&quot;},&quot;driver&quot;:{&quot;name&quot;:&quot;MongoDB Internal Client&quot;,&quot;version&quot;:&quot;5.0.11-6-ga2642ba&quot;},&quot;os&quot;:{&quot;type&quot;:&quot;Linux&quot;,&quot;name&quot;:&quot;Ubuntu&quot;,&quot;architecture&quot;:&quot;x86_64&quot;,&quot;version&quot;:&quot;18.04&quot;},&quot;mongos&quot;:{&quot;host&quot;:&quot;ip-10-128-0-163:20782&quot;,&quot;client&quot;:&quot;10.128.0.163:49632&quot;,&quot;version&quot;:&quot;5.0.11-6-ga2642ba&quot;}},&quot;$configServerState&quot;:{&quot;opTime&quot;:{&quot;ts&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1660602870,&quot;i&quot;:24}},&quot;t&quot;:-1}},&quot;$db&quot;:&quot;admin&quot;},&quot;numYields&quot;:0,&quot;ok&quot;:0,&quot;errMsg&quot;:&quot;Recipient shard shard2-recipient0 reached an unrecoverable error :: caused by :: E11000 duplicate key error collection: reshardingDb.system.resharding.98d3baa8-562a-4c71-8156-8cb71202bc58 index: _id_ dup key: { _id: 0.0 }&quot;,&quot;errName&quot;:&quot;DuplicateKey&quot;,&quot;errCode&quot;:11000,&quot;reslen&quot;:682,&quot;locks&quot;:{&quot;ParallelBatchWriterMode&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;FeatureCompatibilityVersion&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;ReplicationStateTransition&quot;:{&quot;acquireCount&quot;:{&quot;w&quot;:1}},&quot;Global&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;Database&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;Mutex&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}}},&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:60000,&quot;provenance&quot;:&quot;clientSupplied&quot;},&quot;remote&quot;:&quot;10.128.0.163:44006&quot;,&quot;protocol&quot;:&quot;op_msg&quot;,&quot;durationMillis&quot;:2359}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn@mongodb.com&quot;&gt;max.hirschhorn@mongodb.com&lt;/a&gt; pointed out about changes in how _&lt;tt&gt;shardsvrReshardCollection&lt;/tt&gt; is handled between v5.0 and later branches with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62064&quot; title=&quot;Serialize resharding with other DDL operations on stepup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62064&quot;&gt;&lt;del&gt;SERVER-62064&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;tt&gt;NotWritablePrimary&lt;/tt&gt; error is being propagated to mongos via &lt;tt&gt;ShardingDDLCoordinator_NORESILIENT&lt;/tt&gt; after exhausting &lt;a href=&quot;https://github.com/10gen/mongo/blob/v5.0/src/mongo/s/client/shard.cpp#L46&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_configsvReshardCollection command retries&lt;/a&gt; which in turn leads to &lt;a href=&quot;https://github.com/10gen/mongo/blob/v5.0/src/mongo/s/async_requests_sender.cpp#L280&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;a retry of&lt;/a&gt; &lt;tt&gt;_shardsvrReshardCollection&lt;/tt&gt; from mongos. Essentially, if the command is retried or sent again to primary shard from mongos then it waits to acquire &lt;a href=&quot;https://github.com/10gen/mongo/blob/v5.0/src/mongo/db/s/shardsvr_reshard_collection_command.cpp#L80&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ScopedDistLock&lt;/a&gt; before creating an instance of &lt;tt&gt;ReshardCollectionCoordinator&lt;/tt&gt;. This happens after the previous operation completes fully, not allowing a retry to possibly join the existing operation.&lt;/p&gt;

&lt;p&gt;A fix here would be to recommit &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61607&quot; title=&quot;Accept DuplicateKey as a possible error in resharding_nonblocking_coordinator_rebuild.js&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61607&quot;&gt;&lt;del&gt;SERVER-61607&lt;/del&gt;&lt;/a&gt; and accept DuplicateKey as a possible error code.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2122233">SERVER-69142</key>
            <summary>A retry of _shardsvrReshardCollection can cause DuplicateKey error (resharding_nonblocking_coordinator_rebuild.js)</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="abdul.qadeer@mongodb.com">Abdul Qadeer</assignee>
                                    <reporter username="abdul.qadeer@mongodb.com">Abdul Qadeer</reporter>
                        <labels>
                            <label>sharding-nyc-subteam1</label>
                    </labels>
                <created>Thu, 25 Aug 2022 15:45:57 +0000</created>
                <updated>Sun, 29 Oct 2023 21:34:01 +0000</updated>
                            <resolved>Thu, 1 Sep 2022 19:08:42 +0000</resolved>
                                                    <fixVersion>5.0.13</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4796078" author="xgen-internal-githook" created="Thu, 1 Sep 2022 18:37:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Max Hirschhorn&apos;, &apos;email&apos;: &apos;max.hirschhorn@mongodb.com&apos;, &apos;username&apos;: &apos;visemet&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69142&quot; title=&quot;A retry of _shardsvrReshardCollection can cause DuplicateKey error (resharding_nonblocking_coordinator_rebuild.js)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69142&quot;&gt;&lt;del&gt;SERVER-69142&lt;/del&gt;&lt;/a&gt; Add DuplicateKey as acceptable error in resharding test.&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/82f8c7d7999603f7d8e5e03a49e25b3c4eba244e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/82f8c7d7999603f7d8e5e03a49e25b3c4eba244e&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 1 Sep 2022 14:12:23 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 22 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 22 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>138.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>abdul.qadeer@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i17ren:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0qis8:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6347">Sharding 2022-09-05</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i17djz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>