<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:17:21 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-48518] Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.</title>
                <link>https://jira.mongodb.org/browse/SERVER-48518</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;font color=&quot;#ff8b00&quot;&gt;&lt;b&gt;Below problems can be seen only for EMRC=false environment.&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Problem 1: Find command on secondaries can list the rollbacked records.&lt;/b&gt;&#160;&lt;br/&gt;
 Assume, rollback node is Node A and current primary is node B. Common point is &lt;tt&gt;TS(10)&lt;/tt&gt;. And, Node B&#8217;s (current primary) lastAppliedOpTime&#160; is &lt;tt&gt;TS(13)&lt;/tt&gt;.&lt;br/&gt;
 1. Also, assume the following oplog entries in Node A will be rolled back,&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Insert&#160; {&lt;tt&gt;_id:1&lt;/tt&gt;} to collection foo at&#160;&lt;tt&gt;TS(11)&lt;/tt&gt; .&lt;/li&gt;
	&lt;li&gt;Delete {&lt;tt&gt;_id:1&lt;/tt&gt;} from&#160; collection foo at &lt;tt&gt;TS(15)&lt;/tt&gt;.&lt;br/&gt;
 Since {&lt;tt&gt;_id:1&lt;/tt&gt;} is not present in node B, the rollback via refetch algorithm effectively doesn&apos;t do anything for {&lt;tt&gt;_id:1&lt;/tt&gt;} document on node A.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;2. Before rollback, the node A&#8217;s lastApplied opTime is &lt;tt&gt;TS(15)&lt;/tt&gt;. When the rollback completes, the lastApplied opTime of node A is set to &lt;tt&gt;TS(10)&lt;/tt&gt; = common point.&lt;br/&gt;
 3. Node A after transitioning to secondary from rollback state, it catches up to primary and so node A&apos;s lastApplied opTime will be forwarded to &lt;tt&gt;TS(13)&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Now,&#160;if a user tries runs a find command on collection &#8216;foo&#8217; on node A (secondary), the read source of that find command will be set to&#160;&lt;b&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/d00b75bfcac3ac74036ac6c2ceec4e8b42ac93a0/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp#L520&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;kNoOverlap&lt;/a&gt;&lt;/b&gt;&#160;(default read source for secondaries). As a result readTimestamp for that find command will be set as &lt;tt&gt;TS(13)&lt;/tt&gt; = min(lastAppliedopTime, allDurable). &lt;b&gt;Because of which find command would be able to list the rollbacked data record {id:1} .&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Problem 2: Find command on secondaries can also list records with duplicated _id.&lt;/b&gt;&#160;&lt;br/&gt;
 Assume, rollback node is Node A and current primary is node B. Common point is &lt;tt&gt;TS(10)&lt;/tt&gt;. And, Node B&#8217;s (current primary) lastAppliedOpTime&#160; is &lt;tt&gt;TS(13)&lt;/tt&gt;.&lt;br/&gt;
 1. Lets&apos;s say at &lt;tt&gt;TS(5),&lt;/tt&gt; the user previously inserted a document {&lt;tt&gt;_id:1&lt;/tt&gt;} collection foo with&#160;&lt;tt&gt;RecordId=1&lt;/tt&gt;.&lt;br/&gt;
 2. Now, assume the below oplog entry in Node A will be rolled back,&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Delete {&lt;tt&gt;_id:1&lt;/tt&gt;} from&#160; collection foo at &lt;tt&gt;TS(15)&lt;/tt&gt;.&lt;br/&gt;
 To rollback the delete operation, the rollback via refetch algorithm will refetch the document {_id:1} document from node B and insert the {&lt;tt&gt;_id:1&lt;/tt&gt;} with &lt;tt&gt;RecordId=2&lt;/tt&gt; into node A and it will be a * non-timestamped write* (which is equivalent to&#160;&lt;tt&gt;TS(0)).&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;3. Before rollback, the node A&#8217;s lastApplied opTime is &lt;tt&gt;TS(15).&lt;/tt&gt; When the rollback completes, the lastApplied opTime of node A is set to &lt;tt&gt;TS(10)&lt;/tt&gt; = common point.&lt;br/&gt;
 4. Node A after transitioning to secondary from rollback state, it catches up to primary and so node A&apos;s lastApplied opTime will be forwarded to &lt;tt&gt;TS(13)&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Now,&#160;if a user tries runs a find command on collection &#8216;foo&#8217; on node A (secondary), the read source will be &#160;&lt;b&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/d00b75bfcac3ac74036ac6c2ceec4e8b42ac93a0/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp#L520&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;kNoOverlap&lt;/a&gt;&lt;/b&gt;&#160;and read timestamp will be &lt;tt&gt;TS(13)&lt;/tt&gt; = min(lastAppliedopTime, allDurable). &lt;b&gt;Because of which find command would be able to list *two&lt;/b&gt; {&lt;tt&gt;_id:1&lt;/tt&gt;} &lt;b&gt;documents&lt;/b&gt;, one being &lt;tt&gt;RecordId=1&lt;/tt&gt; (whose &lt;tt&gt;TS(5)&lt;/tt&gt;) and other being non-timestamped write &lt;tt&gt;RecordId=2&lt;/tt&gt;&#160;written during rollback.&lt;/p&gt;

&lt;p&gt;I have put the repro steps to demonstrate the above 2 issues. Also, to be noted, both the above issues causes cursor count (itcount) and fast count mismatch( which was the symptom seen in the build failures).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Root cause:&lt;/b&gt;&lt;br/&gt;
 The main problem for EMRC= false is that&#160; it&apos;s not safe to read on secondaries at a timestamp &amp;lt;&#160; the local node&apos;s &lt;a href=&quot;http://10.1.2.40/mongodb/source/src/mongo/db/repl/rs_rollback.h#301&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;top of oplog&apos;s&lt;/a&gt; timestamp prior to entering rollback.&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1368137">SERVER-48518</key>
            <summary>Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.</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="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="suganthi.mani@mongodb.com">Suganthi Mani</reporter>
                        <labels>
                    </labels>
                <created>Mon, 1 Jun 2020 17:37:24 +0000</created>
                <updated>Sun, 29 Oct 2023 22:07:35 +0000</updated>
                            <resolved>Sat, 1 Aug 2020 15:08:12 +0000</resolved>
                                                    <fixVersion>4.4.1</fixVersion>
                    <fixVersion>4.7.0</fixVersion>
                    <fixVersion>4.2.10</fixVersion>
                    <fixVersion>4.0.21</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="3433035" author="xgen-internal-githook" created="Wed, 7 Oct 2020 20:06:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly, try 2&lt;/p&gt;

&lt;p&gt;Includes the following partial backports:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47844&quot; title=&quot;Update _setStableTimestampForStorage to set the stable timestamp without using the stable optime candidates set when EMRC=true&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47844&quot;&gt;&lt;del&gt;SERVER-47844&lt;/del&gt;&lt;/a&gt; Add the ability to get the initialDataTimestamp from the storage engine interface&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 1408e1b8a5392a9001ee598b5cec66afc4e1cf77)&lt;br/&gt;
(cherry picked from commit 329d8c517d8b3c3fb4bcb63eecf6064ac9a007cf)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&lt;/p&gt;

&lt;p&gt;(cherry picked from commit eee49c64cdeb8fa95704b9a316b779eb5eb9800c)&lt;br/&gt;
(cherry picked from commit 88c0265e057f0e5581306f294d1ca2bda19760e4)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50183&quot; title=&quot;Copy _awaitPrimaryAppliedSurpassesRollbackApplied function from RollbackTest to RollbackTestDeluxe&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50183&quot;&gt;&lt;del&gt;SERVER-50183&lt;/del&gt;&lt;/a&gt; Copy _awaitPrimaryAppliedSurpassesRollbackApplied function from RollbackTest to RollbackTestDeluxe&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 252251d38915b9e6722186b9742cc914a045d589)&lt;br/&gt;
(cherry picked from commit d4b960b5f3f4a7a2b18b48d7fb14251704a8bda8)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ece51101e58dfaf7e455c8c96df6ade42b99515c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ece51101e58dfaf7e455c8c96df6ade42b99515c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3423757" author="xgen-internal-githook" created="Fri, 2 Oct 2020 20:17:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit 09c14216c0f4adae7d12c27dc034ffbf4e9b7001.&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/5726924e5c92e019a1730afb8b0724f0cb0e3473&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/5726924e5c92e019a1730afb8b0724f0cb0e3473&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3416975" author="xgen-internal-githook" created="Tue, 29 Sep 2020 18:50:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/09c14216c0f4adae7d12c27dc034ffbf4e9b7001&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/09c14216c0f4adae7d12c27dc034ffbf4e9b7001&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3395692" author="xgen-internal-githook" created="Tue, 15 Sep 2020 22:42:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit b07f80de5850c665e75dc259def6b8999d1077dd.&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/856c3e24c4fc0bf36998e95b4c7b72b075be8e6b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/856c3e24c4fc0bf36998e95b4c7b72b075be8e6b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3392193" author="xgen-internal-githook" created="Mon, 14 Sep 2020 14:10:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Improvements to rollback_via_refetch_anomaly.js&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/0f035d926b879b4a32a3b277dc2e9096fd8f2137&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/0f035d926b879b4a32a3b277dc2e9096fd8f2137&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3391448" author="xgen-internal-githook" created="Mon, 14 Sep 2020 03:19:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Improvements to rollback_via_refetch_anomaly.js&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/259777fa196cc78f855683259d5a40a4515a7184&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/259777fa196cc78f855683259d5a40a4515a7184&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3391446" author="xgen-internal-githook" created="Mon, 14 Sep 2020 03:16:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Improvements to rollback_via_refetch_anomaly.js&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/5a68185f00cd8fafe967c273c4eba4d7123f62f8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/5a68185f00cd8fafe967c273c4eba4d7123f62f8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3380191" author="xgen-internal-githook" created="Tue, 8 Sep 2020 16:34:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;William Schultz&apos;, &apos;email&apos;: &apos;william.schultz@mongodb.com&apos;, &apos;username&apos;: &apos;will62794&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&lt;/p&gt;

&lt;p&gt;Includes the following partial backports:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47844&quot; title=&quot;Update _setStableTimestampForStorage to set the stable timestamp without using the stable optime candidates set when EMRC=true&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47844&quot;&gt;&lt;del&gt;SERVER-47844&lt;/del&gt;&lt;/a&gt; Add the ability to get the initialDataTimestamp from the storage engine interface&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 1408e1b8a5392a9001ee598b5cec66afc4e1cf77)&lt;br/&gt;
(cherry picked from commit 329d8c517d8b3c3fb4bcb63eecf6064ac9a007cf)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&lt;/p&gt;

&lt;p&gt;(cherry picked from commit eee49c64cdeb8fa95704b9a316b779eb5eb9800c)&lt;br/&gt;
(cherry picked from commit 88c0265e057f0e5581306f294d1ca2bda19760e4)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50183&quot; title=&quot;Copy _awaitPrimaryAppliedSurpassesRollbackApplied function from RollbackTest to RollbackTestDeluxe&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50183&quot;&gt;&lt;del&gt;SERVER-50183&lt;/del&gt;&lt;/a&gt; Copy _awaitPrimaryAppliedSurpassesRollbackApplied function from RollbackTest to RollbackTestDeluxe&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 252251d38915b9e6722186b9742cc914a045d589)&lt;br/&gt;
(cherry picked from commit d4b960b5f3f4a7a2b18b48d7fb14251704a8bda8)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b07f80de5850c665e75dc259def6b8999d1077dd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b07f80de5850c665e75dc259def6b8999d1077dd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3356873" author="xgen-internal-githook" created="Tue, 25 Aug 2020 02:47:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&lt;/p&gt;

&lt;p&gt;(cherry picked from commit eee49c64cdeb8fa95704b9a316b779eb5eb9800c)&lt;br/&gt;
(cherry picked from commit 88c0265e057f0e5581306f294d1ca2bda19760e4)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50183&quot; title=&quot;Copy _awaitPrimaryAppliedSurpassesRollbackApplied function from RollbackTest to RollbackTestDeluxe&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50183&quot;&gt;&lt;del&gt;SERVER-50183&lt;/del&gt;&lt;/a&gt; Copy _awaitPrimaryAppliedSurpassesRollbackApplied function from RollbackTest to RollbackTestDeluxe&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 252251d38915b9e6722186b9742cc914a045d589)&lt;br/&gt;
(cherry picked from commit d4b960b5f3f4a7a2b18b48d7fb14251704a8bda8)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e41d7e8da4527f2ee1f227593d874140055e68ad&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e41d7e8da4527f2ee1f227593d874140055e68ad&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3350143" author="xgen-internal-githook" created="Thu, 20 Aug 2020 23:07:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&lt;/p&gt;

&lt;p&gt;(cherry picked from commit eee49c64cdeb8fa95704b9a316b779eb5eb9800c)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/88c0265e057f0e5581306f294d1ca2bda19760e4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/88c0265e057f0e5581306f294d1ca2bda19760e4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3316771" author="xgen-internal-githook" created="Sat, 1 Aug 2020 13:08:58 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/eee49c64cdeb8fa95704b9a316b779eb5eb9800c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/eee49c64cdeb8fa95704b9a316b779eb5eb9800c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3296229" author="jesse" created="Wed, 22 Jul 2020 13:11:05 +0000"  >&lt;p&gt;I reverted my first attempt, 74ab0cdac56, because it caused BFs on the ephemeralForTest storage engine.&lt;/p&gt;</comment>
                            <comment id="3287235" author="suganthi.mani" created="Wed, 15 Jul 2020 23:02:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;, just noticed that &lt;a href=&quot;https://github.com/mongodb/mongo/commit/74ab0cdac56e1cc62fc96d3ca3be3ddfa54f2bcb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; commit added the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/74ab0cdac56e1cc62fc96d3ca3be3ddfa54f2bcb/etc/backports_required_for_multiversion_tests.yml#L44&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;file &lt;/a&gt; &quot;jstests/replsets/rollback_via_refetch_anomaly.js&quot; under &quot;replica_sets_jscore_multiversion_passthrough&quot; section in etc/backports_required_for_multiversion_tests.yml. My understanding is that &quot;replica_sets_jscore_multiversion_passthrough&quot; section will hold only tests under jstests/core directory. I think we should include the jstests/replsets/ directory files under &quot;replica_sets_multiversion&quot; section.&lt;/p&gt;
</comment>
                            <comment id="3283295" author="xgen-internal-githook" created="Mon, 13 Jul 2020 20:04:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit 74ab0cdac56e1cc62fc96d3ca3be3ddfa54f2bcb.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/692b37ddb002a4f1ea1e07a145e1f3ff1e6c9e6e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/692b37ddb002a4f1ea1e07a145e1f3ff1e6c9e6e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3281230" author="xgen-internal-githook" created="Sat, 11 Jul 2020 23:55:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: &apos;jesse@mongodb.com&apos;, &apos;username&apos;: &apos;ajdavis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48518&quot; title=&quot;Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48518&quot;&gt;&lt;del&gt;SERVER-48518&lt;/del&gt;&lt;/a&gt; Fix rollback via refetch anomaly&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/74ab0cdac56e1cc62fc96d3ca3be3ddfa54f2bcb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/74ab0cdac56e1cc62fc96d3ca3be3ddfa54f2bcb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3279448" author="judah.schvimer" created="Fri, 10 Jul 2020 14:14:30 +0000"  >&lt;p&gt;I think for now we want to do both, with the expectation that &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48048&quot; title=&quot;Use resmoke tag files for multiversion blacklisting&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48048&quot;&gt;&lt;del&gt;SERVER-48048&lt;/del&gt;&lt;/a&gt; will remove one of them.&lt;/p&gt;</comment>
                            <comment id="3279418" author="jesse" created="Fri, 10 Jul 2020 14:07:25 +0000"  >&lt;p&gt;Thanks. The new test I&apos;m writing is in replsets/, should I exclude it in backports_required_for_multiversion_tests.yml or in replica_sets_multiversion.yml? I&apos;m finding the instructions hard to follow.&lt;/p&gt;</comment>
                            <comment id="3278842" author="jesse" created="Fri, 10 Jul 2020 01:58:52 +0000"  >&lt;p&gt;The test I&apos;m developing on master is tagged multiversion_incompatible. Before closing this ticket, we must backport to some/all supported versions and adjust/remove the tag.&lt;/p&gt;</comment>
                            <comment id="3196490" author="suganthi.mani" created="Tue, 9 Jun 2020 03:42:11 +0000"  >&lt;p&gt;Spoke with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=daniel.gottlieb&quot; class=&quot;user-hover&quot; rel=&quot;daniel.gottlieb&quot;&gt;daniel.gottlieb&lt;/a&gt; to see if we can have some solution (similar to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48603&quot; title=&quot;Rollback via refetch can result in out of order timestamps&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48603&quot;&gt;SERVER-48603&lt;/a&gt;&apos;s proposed solution) like this &quot;&lt;b&gt;When delete document oplog entries are rolled back, add 0-timestamped tombstone to the update chain for that doc irrespective of whether the sync source have that document or not&lt;/b&gt;&quot;. But then, it seems the fix is complex and WT doesn&apos;t help in anyway.&lt;/p&gt;

&lt;p&gt;So, as per our agreement, we would be implementing solution#3 &quot;&lt;b&gt;node will not transition from recovery to secondary until the node&#8217;s last applied opTime &amp;gt;= max (minValid, initialDataTimestamp).&quot;&lt;/b&gt;. Basically, this &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4cf4600c81684ceb7f07facf64a1ba01519d3dae/src/mongo/db/repl/replication_coordinator_impl.cpp#L5022&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;check&lt;/a&gt;&#160;in ReplicationCoordinatorImpl::finishRecoveryIfEligible() should be modified to take &quot;&lt;tt&gt;initialDataTimestamp&lt;/tt&gt;&quot; also into account.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: We also decided not to update the minValid to set as max(currentMinValid, initialDataTimestamp) because that would make node&apos;s recovery to take a longer time even on node restart. To be noted, minvalid documents are persisted (checkpointed).&lt;/p&gt;</comment>
                            <comment id="3185413" author="judah.schvimer" created="Tue, 2 Jun 2020 19:53:07 +0000"  >&lt;blockquote&gt;
&lt;p&gt;But the problem with this approach is that when read source is set as kUnset ( which is equivalent to kNoTimestamp) is that we would need PBWM lock. This would contradict the work &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38341&quot; title=&quot;Remove Parallel Batch Writer Mutex&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38341&quot;&gt;&lt;del&gt;SERVER-38341&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47866&quot; title=&quot;Secondary readers do not need to reacquire PBWM lock if there are catalog conflicts&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47866&quot;&gt;&lt;del&gt;SERVER-47866&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I think it would be ok to block &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38341&quot; title=&quot;Remove Parallel Batch Writer Mutex&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38341&quot;&gt;&lt;del&gt;SERVER-38341&lt;/del&gt;&lt;/a&gt; on removing eMRC=F and as a result removing rollback via refetch.&lt;/p&gt;

&lt;p&gt;I personally vote Solution #3, it is easy to reason about and should be straightforward to implement. I think we can just set minValid to the max(currentMinValid, initialDataTimestamp).&lt;/p&gt;</comment>
                            <comment id="3181060" author="daniel.gottlieb@10gen.com" created="Tue, 2 Jun 2020 16:01:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=suganthi.mani&quot; class=&quot;user-hover&quot; rel=&quot;suganthi.mani&quot;&gt;suganthi.mani&lt;/a&gt; do you believe this problem dates back to 3.6 (when secondaries could start reading at last applied)?&lt;/p&gt;</comment>
                            <comment id="3178699" author="suganthi.mani" created="Tue, 2 Jun 2020 14:20:50 +0000"  >&lt;p&gt;&lt;b&gt;Solution # 1&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;We don&#8217;t&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/5648a670c3392bae32963fd2af3488d6f9c96ca7/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L328&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;take&lt;/a&gt;&#160;stable checkpoints until stable timestamp reaches&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/59152df7655101ee551d6432727170b42fcd136f/src/mongo/db/repl/rs_rollback.cpp#L1724-L1739&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;initialDataTimestamp (= max(localTopOfOplog, syncSourceTopOfOplog)&lt;/a&gt;, set during rollback via refetch) to avoid data corruption/duplicate data.&#160; I think we should have some kind of similar constraint while choosing readTimestamp on secondaries which has just transitioned from rollback, something like below&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;readTimestamp = min(lastAppliedopTime, allDurable);&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;if (EMRC == false) {&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;   if (readTimestamp &amp;lt; initialDataTimestamp) {&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;      // Change the read source from koverlap to unset.&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;}&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;Alternatively, we can also play by&#160; setting the collectionMinSnapshot to lastAppliedopTime of the rollback node that was prior to entering rollback, for all collections that were touched during rolllback via refetch. So that we hit this&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/5648a670c3392bae32963fd2af3488d6f9c96ca7/src/mongo/db/db_raii.cpp#L197&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;check&lt;/a&gt;&#160;for a find command&#160;and it forces to change our read source from overlap to unset.&lt;br/&gt;
 &#160;&lt;br/&gt;
 But the problem with this approach is that when read source is set as&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/d00b75bfcac3ac74036ac6c2ceec4e8b42ac93a0/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp#L503&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;kUnset&lt;/a&gt; ( which is equivalent to kNoTimestamp) is that we would need PBWM lock. This would contradict the work &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38341&quot; title=&quot;Remove Parallel Batch Writer Mutex&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38341&quot;&gt;&lt;del&gt;SERVER-38341&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47866&quot; title=&quot;Secondary readers do not need to reacquire PBWM lock if there are catalog conflicts&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47866&quot;&gt;&lt;del&gt;SERVER-47866&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Solution # 2&lt;/b&gt;&lt;br/&gt;
 If readTimestamp &amp;lt; initialDataTimestamp, then we can make the readers to read at common point (that&apos;s currently not been recorded, we would need to record it if we go with this fix) which would be the stale data. Not sure, it&apos;s ok to read the stale data???&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Solution # 3&lt;/b&gt;&lt;br/&gt;
 We should not allow reads (or delay transitioning to secondaries from rollback) until the node&apos;s lastAppliedTimestamp &amp;lt; initialDataTimestamp.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Solution # 4&lt;/b&gt;&lt;br/&gt;
 secondaries before running find command, they should run &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d00b75bfcac3ac74036ac6c2ceec4e8b42ac93a0/src/mongo/db/read_concern_mongod.cpp#L108&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;makeNoopWriteIfNeeded()&lt;/a&gt; (which is currently used only for shared environment) to make sure they have reached a target read timestamp &amp;gt;= initialDataTimestamp (proposed by &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=louis.williams&quot; class=&quot;user-hover&quot; rel=&quot;louis.williams&quot;&gt;louis.williams&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Note&lt;/b&gt; : My understanding is that we support at/afterClusterTime reads for EMRC false. So, we would also face problems for at/afterClusterTime reads.&lt;br/&gt;
 CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="1333345">SERVER-47844</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                        <issuelink>
            <issuekey id="1435179">SERVER-50183</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1253817">SERVER-46721</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="641193">SERVER-38341</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="669232">SERVER-38925</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1335042">SERVER-47866</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1372845">SERVER-48603</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>22.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></customfieldvalue>
    <customfieldvalue key="16775"><![CDATA[v4.2]]></customfieldvalue>
    <customfieldvalue key="15640"><![CDATA[v4.0]]></customfieldvalue>
    <customfieldvalue key="15141"><![CDATA[v3.6]]></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>Tue, 2 Jun 2020 16:01:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 18 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/BF-18265'>BF-18265</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-47844'>SERVER-47844</a></s>]]></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>
                            3 years, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>96.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>jesse@mongodb.com</customfieldvalue>
            <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>suganthi.mani@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxnydr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxb5db:</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="3999">Repl 2020-06-29</customfieldvalue>
    <customfieldvalue id="4033">Repl 2020-07-13</customfieldvalue>
    <customfieldvalue id="4139">Repl 2020-08-10</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&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;(function() {&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;&quot;use strict&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;load(&quot;jstests/core/txns/libs/prepare_helpers.js&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;load(&quot;jstests/replsets/libs/rollback_test.js&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;const dbName = jsTest.name();&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;const collName = &quot;coll&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;const rst = new ReplSetTest(&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;    {name: collName, nodes: 3, useBridge: true, nodeOptions: {enableMajorityReadConcern: &quot;false&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;rst.startSet();&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;const config = rst.getReplSetConfig();&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;config.members[2].priority = 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;&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;config.settings = {&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;    chainingAllowed: false&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;rst.initiateWithHighElectionTimeout(config);&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;const rollbackTest = new RollbackTest(collName, rst);&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;const primary = rollbackTest.getPrimary();&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;const secondary = rollbackTest.getSecondary();&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;const tiebreaker = rst.getSecondaries()[1];&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;let testDB = primary.getDB(dbName);&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;const testColl = testDB.getCollection(collName);&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;&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;jsTestLog(&quot;Do a document write&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;assert.commandWorked(testColl.insert({_id: 0}, {&quot;writeConcern&quot;: {&quot;w&quot;: &quot;majority&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;rollbackTest.transitionToRollbackOperations();&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;assert.commandWorked(testColl.insert({_id: 1}, {&quot;writeConcern&quot;: {&quot;w&quot;: 1}}));&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;jsTestLog(`Isolating the primary ${primary.host} from tiebreaker`);&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;primary.disconnect([tiebreaker]);&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;jsTestLog(`Reconnecting the secondary ${secondary.host} to the tiebreaker`);&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;secondary.reconnect([tiebreaker]);&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;jsTestLog(`stepup the secondary ${secondary.host} as the new primary`);&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;assert.soonNoExcept(() =&amp;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;            const res = secondary.adminCommand({replSetStepUp: 1});&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;            return res.ok;&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;        }, `failed to step up node ${secondary.host}`, ReplSetTest.kDefaultTimeoutMS);&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;const newPrimary = secondary;&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;checkLog.containsJson(newPrimary, 21331);	&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;assert.commandWorked(testDB[&quot;anotherCollection&quot;].insert({_id: 0}, {&quot;writeConcern&quot;: {&quot;w&quot;: 1}}));	&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;assert.commandWorked(testColl.remove({_id: 1}));&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;assert.commandWorked(testColl.remove({_id: 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;jsTestLog(`Reconnecting the stale primary ${primary.host} so it&apos;ll go into 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;primary.reconnect([newPrimary]);&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;const stalePrimary = primary;&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;checkLog.containsJson(stalePrimary, 21103);	&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;checkLog.containsJson(stalePrimary, 21682);	&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;jsTestLog(`Wait for the stale primary ${primary.host} to transition into secondary from 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;rst.waitForState(stalePrimary, ReplSetTest.State.SECONDARY);&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;let itCount = testColl.find().itcount();&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;let fastCount = testColl.count();&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;// FastCount shows 1, itCount shows 3 - [ { &quot;_id&quot; : 0 }, { &quot;_id&quot; : 1 }, { &quot;_id&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;&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;// Expected result of itCount is 1 =  [ { &quot;_id&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;&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;jsTestLog(&quot;Check collection count&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;assert.eq(itCount, fastCount, &quot;test collection, fastCount: &quot; + fastCount + &quot;, itCount: &quot; + itCount +  &quot;, coll data : &quot; + tojson(testColl.find().toArray()));&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;rollbackTest.stop();&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;}());&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</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|hxnkn3:</customfieldvalue>

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