<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:12:12 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-26452] `renameCollection` should handle write conflicts</title>
                <link>https://jira.mongodb.org/browse/SERVER-26452</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;tt&gt;renameCollection&lt;/tt&gt; (in &quot;src/mongo/db/catalog/rename_collection.cpp&quot;) does not currently handle write conflicts. To do this, a retry loop needs to be added to ensure that that command succeeds.&lt;/p&gt;</description>
                <environment></environment>
        <key id="320967">SERVER-26452</key>
            <summary>`renameCollection` should handle write conflicts</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="daniel.gottlieb@mongodb.com">Daniel Gottlieb</assignee>
                                    <reporter username="sam.rossi@mongodb.com">Samuel Rossi</reporter>
                        <labels>
                            <label>bkp</label>
                    </labels>
                <created>Tue, 4 Oct 2016 18:16:28 +0000</created>
                <updated>Mon, 27 Feb 2023 21:42:11 +0000</updated>
                            <resolved>Wed, 29 Mar 2017 16:34:16 +0000</resolved>
                                    <version>3.3.12</version>
                                    <fixVersion>3.2.14</fixVersion>
                    <fixVersion>3.4.7</fixVersion>
                    <fixVersion>3.5.6</fixVersion>
                                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1608567" author="xgen-internal-githook" created="Wed, 28 Jun 2017 13:59:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dgottlieb&apos;, u&apos;name&apos;: u&apos;Daniel Gottlieb&apos;, u&apos;email&apos;: u&apos;daniel.gottlieb@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26452&quot; title=&quot;`renameCollection` should handle write conflicts&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26452&quot;&gt;&lt;del&gt;SERVER-26452&lt;/del&gt;&lt;/a&gt;: WCE retry on renameCollection. Address possible dassert in dropIndex.&lt;/p&gt;

&lt;p&gt;Add a write conflict retry loop around the fast-path for renameCollection,&lt;br/&gt;
when the source and target collection are in the same database.&lt;/p&gt;

&lt;p&gt;Additionally, when indexes are being dropped, remove them from the&lt;br/&gt;
collection info cache before removing them from the catalog&lt;br/&gt;
(`_deleteFromDisk`). Removing an index from a catalog can result in&lt;br/&gt;
a WriteConflictException that triggers the rollback on the&lt;br/&gt;
IndexRemoveChange. The rollback adds the index back into the&lt;br/&gt;
collection info cache, which dasserts the index does not exist.&lt;/p&gt;

&lt;p&gt;Lastly, this patch separates out the WTWriteConflictException failpoint&lt;br/&gt;
into one for modifications (WT_CUSOR::insert/remove etc...) and one&lt;br/&gt;
for reads (WT_CURSOR::search/next etc...). The new failpoint is named&lt;br/&gt;
`WTWriteConflictExceptionForReads`. Commands that only roll a die for&lt;br/&gt;
the read failpoint include `listCollections` and `validate`. This&lt;br/&gt;
distinction is useful for resmoke/js tests that are not resilent to&lt;br/&gt;
those commands failing with a write conflict.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bc1a7d9aa34f3c7e61f89afa481e677e4981437d)&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/fff65159be47d38e0333c0e75c778c62484a776b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/fff65159be47d38e0333c0e75c778c62484a776b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1580046" author="xgen-internal-githook" created="Thu, 25 May 2017 16:04:51 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dgottlieb&apos;, u&apos;name&apos;: u&apos;Daniel Gottlieb&apos;, u&apos;email&apos;: u&apos;daniel.gottlieb@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26452&quot; title=&quot;`renameCollection` should handle write conflicts&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26452&quot;&gt;&lt;del&gt;SERVER-26452&lt;/del&gt;&lt;/a&gt;: WCE retry on renameCollection. Address possible dassert in dropIndex.&lt;/p&gt;

&lt;p&gt;Add a write conflict retry loop around the fast-path for renameCollection,&lt;br/&gt;
when the source and target collection are in the same database.&lt;/p&gt;

&lt;p&gt;Additionally, when indexes are being dropped, remove them from the&lt;br/&gt;
collection info cache before removing them from the catalog&lt;br/&gt;
(`_deleteFromDisk`). Removing an index from a catalog can result in&lt;br/&gt;
a WriteConflictException that triggers the rollback on the&lt;br/&gt;
IndexRemoveChange. The rollback adds the index back into the&lt;br/&gt;
collection info cache, which dasserts the index does not exist.&lt;/p&gt;

&lt;p&gt;Lastly, this patch separates out the WTWriteConflictException failpoint&lt;br/&gt;
into one for modifications (WT_CUSOR::insert/remove etc...) and one&lt;br/&gt;
for reads (WT_CURSOR::search/next etc...). The new failpoint is named&lt;br/&gt;
`WTWriteConflictExceptionForReads`. Commands that only roll a die for&lt;br/&gt;
the read failpoint include `listCollections` and `validate`. This&lt;br/&gt;
distinction is useful for resmoke/js tests that are not resilent to&lt;br/&gt;
those commands failing with a write conflict.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bc1a7d9aa34f3c7e61f89afa481e677e4981437d)&lt;br/&gt;
Branch: v3.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a6e45b6f5c568dc280afe373536baa4e60a0b8de&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a6e45b6f5c568dc280afe373536baa4e60a0b8de&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1536067" author="xgen-internal-githook" created="Wed, 29 Mar 2017 16:02:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dgottlieb&apos;, u&apos;name&apos;: u&apos;Daniel Gottlieb&apos;, u&apos;email&apos;: u&apos;daniel.gottlieb@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26452&quot; title=&quot;`renameCollection` should handle write conflicts&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26452&quot;&gt;&lt;del&gt;SERVER-26452&lt;/del&gt;&lt;/a&gt;: WCE retry on renameCollection. Address possible dassert in dropIndex.&lt;/p&gt;

&lt;p&gt;Add a write conflict retry loop around the fast-path for renameCollection,&lt;br/&gt;
when the source and target collection are in the same database.&lt;/p&gt;

&lt;p&gt;Additionally, when indexes are being dropped, remove them from the&lt;br/&gt;
collection info cache before removing them from the catalog&lt;br/&gt;
(`_deleteFromDisk`). Removing an index from a catalog can result in&lt;br/&gt;
a WriteConflictException that triggers the rollback on the&lt;br/&gt;
IndexRemoveChange. The rollback adds the index back into the&lt;br/&gt;
collection info cache, which dasserts the index does not exist.&lt;/p&gt;

&lt;p&gt;Lastly, this patch separates out the WTWriteConflictException failpoint&lt;br/&gt;
into one for modifications (WT_CUSOR::insert/remove etc...) and one&lt;br/&gt;
for reads (WT_CURSOR::search/next etc...). The new failpoint is named&lt;br/&gt;
`WTWriteConflictExceptionForReads`. Commands that only roll a die for&lt;br/&gt;
the read failpoint include `listCollections` and `validate`. This&lt;br/&gt;
distinction is useful for resmoke/js tests that are not resilent to&lt;br/&gt;
those commands failing with a write conflict.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bc1a7d9aa34f3c7e61f89afa481e677e4981437d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bc1a7d9aa34f3c7e61f89afa481e677e4981437d&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2197543">SERVER-71674</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="14340"><![CDATA[v3.4]]></customfieldvalue>
    <customfieldvalue key="13440"><![CDATA[v3.2]]></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, 16 Mar 2017 20:14:35 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 33 weeks 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>dianna.hohensee@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 33 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.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>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>sam.rossi@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjubr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hray87:</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="1597">Storage 2017-03-27</customfieldvalue>
    <customfieldvalue id="1634">Storage 2017-04-17</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;Unfortunately I don&apos;t have a small test case that reproduces the error, but a write conflict can be reproduced by running the `agg_match.js` FSM concurrency test with an increased write conflict activation probability:&lt;/p&gt;

&lt;p&gt;1. Change `jstests/concurrency/fsm_all.js` to call `runWorkLoadsSerially` on an array only containing &quot;jstests/concurrency/fsm_workloads/agg_match.js&quot; (instead of `ls(dir)`&lt;/p&gt;

&lt;p&gt;2. In the function `setupWorkload` in `jstests/concurrency/fsm_libs/runner.js`, add the line `assert.commandWorked(myDB.adminCommand({configureFailPoint: &quot;WTWriteConflictException&quot;, mode: {activationProbability: 0.0005}}));` (right after the declaration of the variable `myDB`)&lt;br/&gt;
3. Run resmoke with `--repeat=10 --executor=conncurrency jstests/concurrency/fsm_all.js`. A write conflict will occur within the first five or so iterations.&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|hrq9u7:</customfieldvalue>

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