<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:31:54 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-76124] CursorNotFound being returned to clients for internal cursor loss</title>
                <link>https://jira.mongodb.org/browse/SERVER-76124</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://parsley.mongodb.com/resmoke/238feb1f828e3aa15e6d80d575f6abe7/all?bookmarks=0,26028,107965&amp;amp;shareLine=26028&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://parsley.mongodb.com/resmoke/238feb1f828e3aa15e6d80d575f6abe7/all?bookmarks=0,26028,107965&amp;amp;shareLine=26028&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mongosync in the above log receives a CursorNotFound error. The cursor in question, though&#8212;5131255404875629212&#8212;appears to be internal to mongos and mongod.&lt;/p&gt;

&lt;p&gt;The first occurrence of 5131255404875629212 in the logs is on shard1 node2 (s1:n2) and indicates a slow query.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://parsley.mongodb.com/resmoke/238feb1f828e3aa15e6d80d575f6abe7/all?bookmarks=0,25541,107965&amp;amp;shareLine=25563&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;The next occurrence&lt;/a&gt;, on shard0 node 0, indicates that the shard0 node that&apos;s answering mongosync&apos;s query is &quot;not in primary or recovering state&quot;. Note that this &lt;em&gt;isn&apos;t&lt;/em&gt; cursor 5131255404875629212, but it might be related.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://parsley.mongodb.com/resmoke/238feb1f828e3aa15e6d80d575f6abe7/all?bookmarks=0,25541,25563,107965&amp;amp;shareLine=26028&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;The next occurrence after that&lt;/a&gt;, on shard0 node 1, is where we start seeing CursorNotFound.&lt;/p&gt;

&lt;p&gt;The line after that is where mongos indicates CursorNotFound, and the line thereafter is where mongosync reports it.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;There appear to be a couple issues here:&lt;br/&gt;
1. Whatever is causing the CursorNotFound&lt;br/&gt;
2. It seems like mongos shouldn&apos;t report CursorNotFound to mongosync here since (if I&apos;m understanding the logs correctly) that is its own cursor for querying shard-rs1, not something that mongosync knows or (directly) cares about.&lt;/p&gt;

&lt;p&gt;The log indicates an election in shard-rs0 as well as &lt;a href=&quot;https://parsley.mongodb.com/resmoke/238feb1f828e3aa15e6d80d575f6abe7/all?bookmarks=0,26028,107965&amp;amp;shareLine=26041&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;a stepUp in shard-rs1&lt;/a&gt;. Maybe these are related?&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;A potential workaround for mongosync is to treat CursorNotFound as a transient, retryable error.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2314990">SERVER-76124</key>
            <summary>CursorNotFound being returned to clients for internal cursor loss</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="felipe.gasper@mongodb.com">Felipe Gasper</reporter>
                        <labels>
                            <label>sharding-wfbf-day</label>
                    </labels>
                <created>Fri, 14 Apr 2023 13:14:13 +0000</created>
                <updated>Tue, 23 May 2023 14:18:06 +0000</updated>
                                            <version>6.0.5</version>
                                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5444785" author="JIRAUSER1257318" created="Tue, 23 May 2023 10:52:55 +0000"  >&lt;p&gt;&lt;a href=&quot;https://parsley.mongodb.com/resmoke/238feb1f828e3aa15e6d80d575f6abe7/all?bookmarks=0,243,1086,25431,25432,25541,25563,25572,26012,26013,26028,26029,107965&amp;amp;filters=000Replica%2520set%2520state%2520trans,000j1%253Acl0%253As0%253An1,0004048756e%252B64,000%253A5131255404875629212,000slow%2520query,000aggregate,000j1%253Acl0%253As%255C%255D,000kill,000NotPrimaryOrSecondary,100mergeCursor,0002274519845428743609&amp;amp;shareLine=26028&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Highlighed logs&lt;/a&gt;&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;// Cursor 5131255404875629212 was established on j1:cl0:s1:n2 (localhost:20256)&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;[j1:cl0:s1:n2] | 2023-04-12T09:40:38.900+00:00 I  COMMAND  51803   [conn56] &quot;Slow query&quot;,&quot;attr&quot;:{&quot;type&quot;:&quot;command&quot;,&quot;ns&quot;:&quot;test.ed_db_cursor_mi&quot;,&quot;appName&quot;:&quot;mongosync, version: 1.2.0-122-g9698ec32, id: shard-rs0, cluster: src, commit: 9698ec32, go version: go1.19.7, compiler: gc&quot;,&quot;command&quot;:{&quot;aggregate&quot;:&quot;ed_db_cursor_mi&quot;,&quot;pipeline&quot;:[{&quot;$sample&quot;:{&quot;size&quot;:0}},{&quot;$project&quot;:{&quot;_id&quot;:true}}],&quot;allowDiskUse&quot;:true,&quot;cursor&quot;:{&quot;batchSize&quot;:0},&quot;maxTimeMS&quot;:300000,&quot;readConcern&quot;:{&quot;level&quot;:&quot;majority&quot;},&quot;collectionUUID&quot;:{&quot;$uuid&quot;:&quot;0959e90f-fb90-4529-9dc7-c74216bebe08&quot;},&quot;needsMerge&quot;:true,&quot;let&quot;:{&quot;CLUSTER_TIME&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292437,&quot;i&quot;:46}},&quot;NOW&quot;:{&quot;$date&quot;:&quot;2023-04-12T09:40:38.406Z&quot;}},&quot;fromMongos&quot;:true,&quot;collation&quot;:{&quot;locale&quot;:&quot;simple&quot;},&quot;$_generateV2ResumeTokens&quot;:false,&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:0,&quot;provenance&quot;:&quot;implicitDefault&quot;},&quot;shardVersion&quot;:{&quot;t&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292415,&quot;i&quot;:66}},&quot;e&quot;:{&quot;$oid&quot;:&quot;64367c7fecf82c44e5182052&quot;},&quot;v&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1,&quot;i&quot;:3}}},&quot;clientOperationKey&quot;:{&quot;$uuid&quot;:&quot;a6ceb25a-c433-4fb8-ad6a-8fe859a88da7&quot;},&quot;lsid&quot;:{&quot;id&quot;:{&quot;$uuid&quot;:&quot;95ef134b-562d-4f70-b298-31d63f814792&quot;},&quot;uid&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=&quot;,&quot;subType&quot;:&quot;0&quot;}}},&quot;maxTimeMSOpOnly&quot;:300010,&quot;$readPreference&quot;:{&quot;mode&quot;:&quot;nearest&quot;,&quot;hedge&quot;:{&quot;enabled&quot;:true}},&quot;$clusterTime&quot;:{&quot;clusterTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292437,&quot;i&quot;:46}},&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;:1681292437,&quot;i&quot;:45}},&quot;$topologyTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292368,&quot;i&quot;:6}},&quot;$client&quot;:{&quot;driver&quot;:{&quot;name&quot;:&quot;mongo-go-driver&quot;,&quot;version&quot;:&quot;v1.11.3&quot;},&quot;os&quot;:{&quot;type&quot;:&quot;linux&quot;,&quot;architecture&quot;:&quot;amd64&quot;},&quot;platform&quot;:&quot;go1.19.7&quot;,&quot;application&quot;:{&quot;name&quot;:&quot;mongosync, version: 1.2.0-122-g9698ec32, id: shard-rs0, cluster: src, commit: 9698ec32, go version: go1.19.7, compiler: gc&quot;},&quot;mongos&quot;:{&quot;host&quot;:&quot;ip-10-128-27-197.ec2.internal:20257&quot;,&quot;client&quot;:&quot;127.0.0.1:45484&quot;,&quot;version&quot;:&quot;6.0.5-103-g9cdf8d1&quot;}},&quot;mayBypassWriteBlocking&quot;:false,&quot;$db&quot;:&quot;test&quot;},&quot;planSummary&quot;:&quot;COLLSCAN&quot;,&quot;cursorid&quot;:5131255404875629212,&quot;keysExamined&quot;:0,&quot;docsExamined&quot;:0,&quot;numYields&quot;:0,&quot;nreturned&quot;:0,&quot;queryHash&quot;:&quot;EF4BF651&quot;,&quot;queryFramework&quot;:&quot;classic&quot;,&quot;reslen&quot;:307,&quot;locks&quot;:{&quot;FeatureCompatibilityVersion&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;Global&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:1}},&quot;Mutex&quot;:{&quot;acquireCount&quot;:{&quot;r&quot;:3}}},&quot;readConcern&quot;:{&quot;level&quot;:&quot;majority&quot;,&quot;provenance&quot;:&quot;clientSupplied&quot;},&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:0,&quot;provenance&quot;:&quot;implicitDefault&quot;},&quot;storage&quot;:{},&quot;remote&quot;:&quot;127.0.0.1:39506&quot;,&quot;protocol&quot;:&quot;op_msg&quot;,&quot;durationMillis&quot;:493}&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;// j1:cl0:s0:n0 executes $mergeCursors or 5131255404875629212 (above) and 2274519845428743609 (localhost:20252).&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;// It fails dues to NotPrimaryOrSecondary from 20252 because it is in the middle of a rollback.&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;[j1:cl0:s0:n0] | 2023-04-12T09:40:38.902+00:00 W  COMMAND  23799   [conn89] &quot;Aggregate command executor error&quot;,&quot;attr&quot;:{&quot;error&quot;:{&quot;code&quot;:13436,&quot;codeName&quot;:&quot;NotPrimaryOrSecondary&quot;,&quot;errmsg&quot;:&quot;Error on remote shard localhost:20252 :: caused by :: node is not in primary or recovering state&quot;},&quot;stats&quot;:{},&quot;cmd&quot;:{&quot;aggregate&quot;:&quot;ed_db_cursor_mi&quot;,&quot;pipeline&quot;:[{&quot;$mergeCursors&quot;:{&quot;lsid&quot;:{&quot;id&quot;:{&quot;$uuid&quot;:&quot;95ef134b-562d-4f70-b298-31d63f814792&quot;},&quot;uid&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=&quot;,&quot;subType&quot;:&quot;0&quot;}}},&quot;sort&quot;:{&quot;$rand&quot;:-1},&quot;compareWholeSortKey&quot;:false,&quot;remotes&quot;:[{&quot;shardId&quot;:&quot;shard-rs0&quot;,&quot;hostAndPort&quot;:&quot;localhost:20252&quot;,&quot;cursorResponse&quot;:{&quot;cursor&quot;:{&quot;id&quot;:2274519845428743609,&quot;ns&quot;:&quot;test.ed_db_cursor_mi&quot;,&quot;firstBatch&quot;:[]},&quot;ok&quot;:1}},{&quot;shardId&quot;:&quot;shard-rs1&quot;,&quot;hostAndPort&quot;:&quot;localhost:20256&quot;,&quot;cursorResponse&quot;:{&quot;cursor&quot;:{&quot;id&quot;:5131255404875629212,&quot;ns&quot;:&quot;test.ed_db_cursor_mi&quot;,&quot;firstBatch&quot;:[]},&quot;ok&quot;:1}}],&quot;tailableMode&quot;:&quot;normal&quot;,&quot;nss&quot;:&quot;test.ed_db_cursor_mi&quot;,&quot;allowPartialResults&quot;:false,&quot;recordRemoteOpWaitTime&quot;:true}},{&quot;$replaceRoot&quot;:{&quot;newRoot&quot;:{&quot;$arrayToObject&quot;:[[{&quot;k&quot;:{&quot;$const&quot;:&quot;_id&quot;},&quot;v&quot;:{&quot;$toHashedIndexKey&quot;:&quot;$_id&quot;}}]]}}},{&quot;$bucketAuto&quot;:{&quot;groupBy&quot;:&quot;$$ROOT&quot;,&quot;buckets&quot;:4,&quot;output&quot;:{&quot;count&quot;:{&quot;$sum&quot;:{&quot;$const&quot;:1}}}}}],&quot;allowDiskUse&quot;:true,&quot;cursor&quot;:{&quot;batchSize&quot;:101},&quot;maxTimeMS&quot;:300000,&quot;readConcern&quot;:{&quot;level&quot;:&quot;majority&quot;},&quot;collectionUUID&quot;:{&quot;$uuid&quot;:&quot;0959e90f-fb90-4529-9dc7-c74216bebe08&quot;},&quot;fromMongos&quot;:true,&quot;let&quot;:{&quot;CLUSTER_TIME&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292437,&quot;i&quot;:46}},&quot;NOW&quot;:{&quot;$date&quot;:&quot;2023-04-12T09:40:38.406Z&quot;}},&quot;collation&quot;:{&quot;locale&quot;:&quot;simple&quot;},&quot;shardVersion&quot;:{&quot;t&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:4294967295,&quot;i&quot;:4294967295}},&quot;e&quot;:{&quot;$oid&quot;:&quot;00000000ffffffffffffffff&quot;},&quot;v&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:0,&quot;i&quot;:0}}},&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:0,&quot;provenance&quot;:&quot;implicitDefault&quot;},&quot;lsid&quot;:{&quot;id&quot;:{&quot;$uuid&quot;:&quot;95ef134b-562d-4f70-b298-31d63f814792&quot;},&quot;uid&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=&quot;,&quot;subType&quot;:&quot;0&quot;}}},&quot;maxTimeMSOpOnly&quot;:299515,&quot;$readPreference&quot;:{&quot;mode&quot;:&quot;nearest&quot;,&quot;hedge&quot;:{&quot;enabled&quot;:true}},&quot;$clusterTime&quot;:{&quot;clusterTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292437,&quot;i&quot;:46}},&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;:1681292437,&quot;i&quot;:45}},&quot;$topologyTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292368,&quot;i&quot;:6}},&quot;$client&quot;:{&quot;driver&quot;:{&quot;name&quot;:&quot;mongo-go-driver&quot;,&quot;version&quot;:&quot;v1.11.3&quot;},&quot;os&quot;:{&quot;type&quot;:&quot;linux&quot;,&quot;architecture&quot;:&quot;amd64&quot;},&quot;platform&quot;:&quot;go1.19.7&quot;,&quot;application&quot;:{&quot;name&quot;:&quot;mongosync, version: 1.2.0-122-g9698ec32, id: shard-rs0, cluster: src, commit: 9698ec32, go version: go1.19.7, compiler: gc&quot;},&quot;mongos&quot;:{&quot;host&quot;:&quot;ip-10-128-27-197.ec2.internal:20257&quot;,&quot;client&quot;:&quot;127.0.0.1:45484&quot;,&quot;version&quot;:&quot;6.0.5-103-g9cdf8d1&quot;}},&quot;mayBypassWriteBlocking&quot;:false,&quot;$db&quot;:&quot;test&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;&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;// The error is propagated back to mongos.&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;[j1:cl0:s] | 2023-04-12T09:40:38.902+00:00 I  NETWORK  4712102 [conn58] &quot;Host failed in replica set&quot;,&quot;attr&quot;:{&quot;replicaSet&quot;:&quot;shard-rs0&quot;,&quot;host&quot;:&quot;localhost:20251&quot;,&quot;error&quot;:{&quot;code&quot;:13436,&quot;codeName&quot;:&quot;NotPrimaryOrSecondary&quot;,&quot;errmsg&quot;:&quot;PlanExecutor error during aggregation :: caused by :: Error on remote shard localhost:20252 :: caused by :: node is not in primary or recovering state&quot;},&quot;action&quot;:{&quot;dropConnections&quot;:false,&quot;requestImmediateCheck&quot;:true,&quot;outcome&quot;:{&quot;host&quot;:&quot;localhost:20251&quot;,&quot;success&quot;:false,&quot;errorMessage&quot;:&quot;NotPrimaryOrSecondary: PlanExecutor error during aggregation :: caused by :: Error on remote shard localhost:20252 :: caused by :: node is not in primary or recovering state&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;&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;// Mongos appears to retry the same $mergeCursors. But it finds CursorNotFound (cursor 5131255404875629212, localhost:20256)&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;// Did the previous $mergeCursors failure cause the merging shard to kill the cursors?&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;[j1:cl0:s0:n1] | 2023-04-12T09:40:41.514+00:00 W  COMMAND  23799   [conn54] &quot;Aggregate command executor error&quot;,&quot;attr&quot;:{&quot;error&quot;:{&quot;code&quot;:43,&quot;codeName&quot;:&quot;CursorNotFound&quot;,&quot;errmsg&quot;:&quot;Error on remote shard localhost:20256 :: caused by :: cursor id 5131255404875629212 not found&quot;},&quot;stats&quot;:{},&quot;cmd&quot;:{&quot;aggregate&quot;:&quot;ed_db_cursor_mi&quot;,&quot;pipeline&quot;:[{&quot;$mergeCursors&quot;:{&quot;lsid&quot;:{&quot;id&quot;:{&quot;$uuid&quot;:&quot;95ef134b-562d-4f70-b298-31d63f814792&quot;},&quot;uid&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=&quot;,&quot;subType&quot;:&quot;0&quot;}}},&quot;sort&quot;:{&quot;$rand&quot;:-1},&quot;compareWholeSortKey&quot;:false,&quot;remotes&quot;:[{&quot;shardId&quot;:&quot;shard-rs0&quot;,&quot;hostAndPort&quot;:&quot;localhost:20252&quot;,&quot;cursorResponse&quot;:{&quot;cursor&quot;:{&quot;id&quot;:2274519845428743609,&quot;ns&quot;:&quot;test.ed_db_cursor_mi&quot;,&quot;firstBatch&quot;:[]},&quot;ok&quot;:1}},{&quot;shardId&quot;:&quot;shard-rs1&quot;,&quot;hostAndPort&quot;:&quot;localhost:20256&quot;,&quot;cursorResponse&quot;:{&quot;cursor&quot;:{&quot;id&quot;:5131255404875629212,&quot;ns&quot;:&quot;test.ed_db_cursor_mi&quot;,&quot;firstBatch&quot;:[]},&quot;ok&quot;:1}}],&quot;tailableMode&quot;:&quot;normal&quot;,&quot;nss&quot;:&quot;test.ed_db_cursor_mi&quot;,&quot;allowPartialResults&quot;:false,&quot;recordRemoteOpWaitTime&quot;:true}},{&quot;$replaceRoot&quot;:{&quot;newRoot&quot;:{&quot;$arrayToObject&quot;:[[{&quot;k&quot;:{&quot;$const&quot;:&quot;_id&quot;},&quot;v&quot;:{&quot;$toHashedIndexKey&quot;:&quot;$_id&quot;}}]]}}},{&quot;$bucketAuto&quot;:{&quot;groupBy&quot;:&quot;$$ROOT&quot;,&quot;buckets&quot;:4,&quot;output&quot;:{&quot;count&quot;:{&quot;$sum&quot;:{&quot;$const&quot;:1}}}}}],&quot;allowDiskUse&quot;:true,&quot;cursor&quot;:{&quot;batchSize&quot;:101},&quot;maxTimeMS&quot;:300000,&quot;readConcern&quot;:{&quot;level&quot;:&quot;majority&quot;},&quot;collectionUUID&quot;:{&quot;$uuid&quot;:&quot;0959e90f-fb90-4529-9dc7-c74216bebe08&quot;},&quot;fromMongos&quot;:true,&quot;let&quot;:{&quot;CLUSTER_TIME&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292437,&quot;i&quot;:46}},&quot;NOW&quot;:{&quot;$date&quot;:&quot;2023-04-12T09:40:38.406Z&quot;}},&quot;collation&quot;:{&quot;locale&quot;:&quot;simple&quot;},&quot;shardVersion&quot;:{&quot;t&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:4294967295,&quot;i&quot;:4294967295}},&quot;e&quot;:{&quot;$oid&quot;:&quot;00000000ffffffffffffffff&quot;},&quot;v&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:0,&quot;i&quot;:0}}},&quot;writeConcern&quot;:{&quot;w&quot;:&quot;majority&quot;,&quot;wtimeout&quot;:0,&quot;provenance&quot;:&quot;implicitDefault&quot;},&quot;lsid&quot;:{&quot;id&quot;:{&quot;$uuid&quot;:&quot;95ef134b-562d-4f70-b298-31d63f814792&quot;},&quot;uid&quot;:{&quot;$binary&quot;:{&quot;base64&quot;:&quot;47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=&quot;,&quot;subType&quot;:&quot;0&quot;}}},&quot;maxTimeMSOpOnly&quot;:296902,&quot;$readPreference&quot;:{&quot;mode&quot;:&quot;nearest&quot;,&quot;hedge&quot;:{&quot;enabled&quot;:true}},&quot;$clusterTime&quot;:{&quot;clusterTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292439,&quot;i&quot;:5}},&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;:1681292439,&quot;i&quot;:2}},&quot;$topologyTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292368,&quot;i&quot;:6}},&quot;$client&quot;:{&quot;driver&quot;:{&quot;name&quot;:&quot;mongo-go-driver&quot;,&quot;version&quot;:&quot;v1.11.3&quot;},&quot;os&quot;:{&quot;type&quot;:&quot;linux&quot;,&quot;architecture&quot;:&quot;amd64&quot;},&quot;platform&quot;:&quot;go1.19.7&quot;,&quot;application&quot;:{&quot;name&quot;:&quot;mongosync, version: 1.2.0-122-g9698ec32, id: shard-rs0, cluster: src, commit: 9698ec32, go version: go1.19.7, compiler: gc&quot;},&quot;mongos&quot;:{&quot;host&quot;:&quot;ip-10-128-27-197.ec2.internal:20257&quot;,&quot;client&quot;:&quot;127.0.0.1:45484&quot;,&quot;version&quot;:&quot;6.0.5-103-g9cdf8d1&quot;}},&quot;mayBypassWriteBlocking&quot;:false,&quot;$db&quot;:&quot;test&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;&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;// CursorNotFound is returned to the client, rather than the NotPrimaryOrSecondary that would have been returned in a replica set environment.&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;[j1:cl0:s] | 2023-04-12T09:40:41.515+00:00 I  COMMAND  51803   [conn58] &quot;Slow query&quot;,&quot;attr&quot;:{&quot;type&quot;:&quot;command&quot;,&quot;ns&quot;:&quot;test.ed_db_cursor_mi&quot;,&quot;appName&quot;:&quot;mongosync, version: 1.2.0-122-g9698ec32, id: shard-rs0, cluster: src, commit: 9698ec32, go version: go1.19.7, compiler: gc&quot;,&quot;command&quot;:{&quot;aggregate&quot;:&quot;ed_db_cursor_mi&quot;,&quot;collectionUUID&quot;:{&quot;$uuid&quot;:&quot;0959e90f-fb90-4529-9dc7-c74216bebe08&quot;},&quot;pipeline&quot;:[{&quot;$sample&quot;:{&quot;size&quot;:0}},{&quot;$replaceWith&quot;:{&quot;$arrayToObject&quot;:[[{&quot;k&quot;:&quot;_id&quot;,&quot;v&quot;:{&quot;$toHashedIndexKey&quot;:&quot;$_id&quot;}}]]}},{&quot;$bucketAuto&quot;:{&quot;groupBy&quot;:&quot;$$ROOT&quot;,&quot;buckets&quot;:4}}],&quot;allowDiskUse&quot;:true,&quot;cursor&quot;:{},&quot;readConcern&quot;:{&quot;level&quot;:&quot;majority&quot;},&quot;lsid&quot;:{&quot;id&quot;:{&quot;$uuid&quot;:&quot;95ef134b-562d-4f70-b298-31d63f814792&quot;}},&quot;$clusterTime&quot;:{&quot;clusterTime&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:1681292437,&quot;i&quot;:46}},&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;maxTimeMS&quot;:300000,&quot;$db&quot;:&quot;test&quot;,&quot;$readPreference&quot;:{&quot;mode&quot;:&quot;nearest&quot;}},&quot;nShards&quot;:2,&quot;numYields&quot;:0,&quot;ok&quot;:0,&quot;errMsg&quot;:&quot;PlanExecutor error during aggregation :: caused by :: Error on remote shard localhost:20256 :: caused by :: cursor id 5131255404875629212 not found&quot;,&quot;errName&quot;:&quot;CursorNotFound&quot;,&quot;errCode&quot;:43,&quot;reslen&quot;:362,&quot;readConcern&quot;:{&quot;level&quot;:&quot;majority&quot;,&quot;provenance&quot;:&quot;clientSupplied&quot;},&quot;remote&quot;:&quot;127.0.0.1:45484&quot;,&quot;protocol&quot;:&quot;op_msg&quot;,&quot;durationMillis&quot;:3109}&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;I suspect that the mongos is retrying a $mergeCursors after a failure, but the underlaying cursors might have been killed by the previous attempt. Thus CursorNotFound is returned to the client, which did not expect that. (In a replica set, it would have received NotPrimaryOrSecondary, which it is prepared to handle. Reassigning to query execution.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </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>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 18 Apr 2023 17:09:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        37 weeks, 1 day 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_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>kyle.suarez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            37 weeks, 1 day ago
                        </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>backlog-query-execution</customfieldvalue>
            <customfieldvalue>felipe.gasper@mongodb.com</customfieldvalue>
            <customfieldvalue>jordi.serra-torrens@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i24rfr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1hpkn:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7185">Sharding EMEA 2023-05-01</customfieldvalue>
    <customfieldvalue id="7186">Sharding EMEA 2023-05-15</customfieldvalue>

                        </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|i24dl3:</customfieldvalue>

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