<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:13:32 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-26898] _migrateClone may hold WT snapshot for a long time</title>
                <link>https://jira.mongodb.org/browse/SERVER-26898</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This _migrateClone ran for about half an hour, but numYields is 0.&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;   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;2016-11-02T14:22:17.136+0000 I COMMAND [conn4545837] command admin.$cmd command: _migrateClone { _migrateClone: 1, sessionId: &quot;699910aecbf021343ba5984d0c6cd5c5&quot; } keyUpdates:0 writeConflicts:0 numYields:0 reslen:16773886 locks:{ Global: { acquireCount: { r: 8300 } }, Database: { acquireCount: { r: 4150 } }, Collection: { acquireCount: { r: 4150 } } } protocol:op_command 1709840ms&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment></environment>
        <key id="329158">SERVER-26898</key>
            <summary>_migrateClone may hold WT snapshot for a long time</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="9">Done</resolution>
                                        <assignee username="kaloian.manassiev@mongodb.com">Kaloian Manassiev</assignee>
                                    <reporter username="bruce.lucas@mongodb.com">Bruce Lucas</reporter>
                        <labels>
                            <label>code-only</label>
                    </labels>
                <created>Thu, 3 Nov 2016 18:01:02 +0000</created>
                <updated>Thu, 25 Jan 2018 00:45:47 +0000</updated>
                            <resolved>Fri, 4 Nov 2016 13:15:55 +0000</resolved>
                                    <version>3.1.8</version>
                    <version>3.2.0</version>
                    <version>3.2.10</version>
                    <version>3.4.0-rc2</version>
                                    <fixVersion>3.2.11</fixVersion>
                    <fixVersion>3.4.0-rc3</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="1431237" author="kaloian.manassiev" created="Thu, 10 Nov 2016 17:17:27 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=royrez%40microsoft.com&quot; class=&quot;user-hover&quot; rel=&quot;royrez@microsoft.com&quot;&gt;royrez@microsoft.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are no specific JS or unit-test tests for the WT snapshot release since we have no way to test for that in 3.2 apart from writing a heavy stress scenario, which is not automatable. Instead this particular fix was tested manually through stepping in the debugger.&lt;/p&gt;

&lt;p&gt;The referenced commit restores the usage of &lt;tt&gt;ScopedTransaction&lt;/tt&gt; inside the cloner and other loops. The &lt;a href=&quot;https://github.com/mongodb/mongo/blob/31716d2ae526d82d7d36464f6c9fae8b9f38542f/src/mongo/db/operation_context.h#L291&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;destructor of &lt;tt&gt;ScopedTransaction&lt;/tt&gt; resets&lt;/a&gt; the WT range of pinned data so it can be cleared from cache. In &lt;a href=&quot;https://github.com/mongodb/mongo/commit/31716d2ae526d82d7d36464f6c9fae8b9f38542f#diff-f40acb5a4a510280ddaa84216b996302R319&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this 3.2 commit&lt;/a&gt; we removed the usage of AutoGetCollectionForRead, without realizing that it also removes the underlying ScopedTransaction. This means for the duration of the loop we will hold that range pinned.&lt;/p&gt;

&lt;p&gt;In 3.4 we have made migrations more unit-testable though &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c1e22d964889e573001f4710c01841c48318d40b/src/mongo/db/s/migration_chunk_cloner_source.h#L53&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;introducing abstractions&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c1e22d964889e573001f4710c01841c48318d40b/src/mongo/db/s/migration_chunk_cloner_source_legacy.h#L54&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;isolating the chunk cloning&lt;/a&gt; from the rest of migration so we will be able to programmatically assert that no WT data is being pinned.&lt;/p&gt;

&lt;p&gt;Hope this helps.&lt;/p&gt;

&lt;p&gt;-Kal.&lt;/p&gt;</comment>
                            <comment id="1431102" author="royrez@microsoft.com" created="Thu, 10 Nov 2016 15:36:33 +0000"  >&lt;p&gt;It looks like this commit doesn&apos;t contain any tests. Or have I missed the validation that this fix works?&lt;/p&gt;</comment>
                            <comment id="1430128" author="kaloian.manassiev" created="Wed, 9 Nov 2016 14:12:18 +0000"  >&lt;p&gt;This is not isolated to the cloning part of sharding migration and that&apos;s why there were other places where ScopedTransaction had to be re-introduced. However, since cloning typically transfers the most data, it is most prominent there.&lt;/p&gt;</comment>
                            <comment id="1430080" author="asya" created="Wed, 9 Nov 2016 12:15:18 +0000"  >&lt;p&gt;Is this specific to _migrateClone?  I.e. there&apos;s no relationship to say initial sync replication cloning, is there?&lt;/p&gt;</comment>
                            <comment id="1426170" author="xgen-internal-githook" created="Fri, 4 Nov 2016 13:14:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;kaloianm&apos;, u&apos;name&apos;: u&apos;Kaloian Manassiev&apos;, u&apos;email&apos;: u&apos;kaloian.manassiev@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26898&quot; title=&quot;_migrateClone may hold WT snapshot for a long time&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26898&quot;&gt;&lt;del&gt;SERVER-26898&lt;/del&gt;&lt;/a&gt; Use ScopedTransaction at the migration donor&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f94a71efa246401defa7fd1c48d9c20e1e652dd9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f94a71efa246401defa7fd1c48d9c20e1e652dd9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1426130" author="xgen-internal-githook" created="Fri, 4 Nov 2016 12:35:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;kaloianm&apos;, u&apos;name&apos;: u&apos;Kaloian Manassiev&apos;, u&apos;email&apos;: u&apos;kaloian.manassiev@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26898&quot; title=&quot;_migrateClone may hold WT snapshot for a long time&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26898&quot;&gt;&lt;del&gt;SERVER-26898&lt;/del&gt;&lt;/a&gt; Use ScopedTransaction in the MigrationSourceManager&lt;/p&gt;

&lt;p&gt;Adds explicit ScopedTransactions which were removed as part of commit&lt;br/&gt;
31716d2ae526d82d7d36464f6c9fae8b9f38542f. This ensures that the WT&lt;br/&gt;
snapshot will be reset at the manual yield points done by the&lt;br/&gt;
MigrationSourceManager.&lt;br/&gt;
Branch: v3.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/7f75a49639cdc910dcdbc3f8757c3474156d3ead&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/7f75a49639cdc910dcdbc3f8757c3474156d3ead&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1425487" author="kaloian.manassiev" created="Thu, 3 Nov 2016 19:04:10 +0000"  >&lt;p&gt;The problem occurs because even though we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/v3.2/src/mongo/db/s/migration_source_manager.cpp#L507&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;yield&lt;/a&gt; the collection lock, we never reset the WT snapshot. In 3.0 we use &lt;a href=&quot;https://github.com/mongodb/mongo/blob/v3.0/src/mongo/s/d_migrate.cpp#L633&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;AutoGetCollectionForRead&lt;/tt&gt;&lt;/a&gt; which internally resets the WT snapshot.&lt;/p&gt;

&lt;p&gt;This is a bug in 3.2 and 3.4.0-rc2, but does not exist in 3.0.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12451" key="com.atlassian.jira.plugin.system.customfieldtypes:multiversion">
                        <customfieldname>Backport Completed</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="17528">3.2.11</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 3 Nov 2016 19:04:10 +0000</customfieldvalue>

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


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_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>kaloian.manassiev@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 13 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>bruce.lucas@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>royrez@microsoft.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjrxb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsrj2n:</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_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_11861" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>User Summary</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11856"><![CDATA[Not Needed]]></customfieldvalue>

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

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