<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:05:52 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-66588] In catalog shard POC the config secondary should be prevented writing</title>
                <link>https://jira.mongodb.org/browse/SERVER-66588</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The quick fix I did for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-66224&quot; title=&quot;No shard found for host error in catalog POC&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-66224&quot;&gt;&lt;del&gt;SERVER-66224&lt;/del&gt;&lt;/a&gt; was fixing tests but in general case it&apos;s wrong. Max said:&lt;br/&gt;
&#160;&lt;br/&gt;
&quot;Brett and I have been debugging an issue and learned that secondaries in the config server replica set attempt to extend the lease of the distributed lock. The writes the secondaries do are through ShardLocal so they end up failing with NotWritablePrimary - &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3805148358ae9b82e5f3b9307bd25fbf7a4dd4b5/src/mongo/db/s/dist_lock_catalog_replset.cpp#L206-L215&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/3805148358ae9b82e5f3b9307bd25fbf7a4dd4b5/src/mongo/db/s/dist_lock_catalog_replset.cpp#L206-L215&lt;/a&gt;I haven&apos;t been following the ShardLocal / ShardRemote / ShardConfig but would like to make certain we forbid secondaries from contacting the config server primary and extending the lease. Only the primary of the replica set should ever be doing the distributed lock pinging so fixing that may be the ultimate preferred solution&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/3805148358ae9b82e5f3b9307bd25fbf7a4dd4b5/src/mongo/db/s/dist_lock_catalog_replset.cpp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;dist_lock_catalog_replset.cpp&lt;/a&gt;&lt;br/&gt;
Status DistLockCatalogImpl::ping(OperationContext* opCtx, StringData processID, Date_t ping) {&lt;br/&gt;
 &#160; &#160;auto request = write_ops::FindAndModifyCommandRequest(_lockPingNS);&lt;br/&gt;
 &#160; &#160;request.setQuery(BSON(LockpingsType::process() &amp;lt;&amp;lt; processID));&lt;br/&gt;
 &#160; &#160;request.setUpdate(write_ops::UpdateModification::parseFromClassicUpdate(&lt;br/&gt;
 &#160; &#160; &#160; &#160;BSON(&quot;$set&quot; &amp;lt;&amp;lt; BSON(LockpingsType::ping(ping)))));&lt;/p&gt;


&lt;p&gt;I&apos;m saying it we should ideally prevent secondaries from pinging the distributed lock. Secondaries aren&apos;t authoritative&lt;br/&gt;
&#160;&lt;br/&gt;
At minimum the writes the secondaries attempt to do today must still happen locally (and thus fail with NotWritablePrimary) if they are going to happen at all&lt;br/&gt;
&#160;&lt;br/&gt;
Yes normally &lt;a href=&quot;https://github.com/mongodb/mongo/blob/5dff90ff1e8a672a8716f0c9c936f8f50e56fd0b/src/mongo/db/repl/oplog.cpp#L367&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/5dff90ff1e8a672a8716f0c9c936f8f50e56fd0b/src/mongo/db/repl/oplog.cpp#L367&lt;/a&gt;&#160;would abort the local storage transaction on the secondary because config.lockpings is a replicated collection&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/5dff90ff1e8a672a8716f0c9c936f8f50e56fd0b/src/mongo/db/repl/oplog.cpp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;oplog.cpp&lt;/a&gt;&lt;br/&gt;
 &#160; &#160; &#160; &#160;uasserted(ErrorCodes::NotWritablePrimary, ss);&lt;br/&gt;
The specific case I&apos;m worried about is secondary node in the catalog shard wants to ping the distributed lock so it contacts the current primary of the catalog shard. Instead it be the exclusive responsibility of the primary of the shards to do that pinging&lt;br/&gt;
&#160;&lt;br/&gt;
Today on the CSRS the secondary node in the CSRS wants to ping the distributed lock so it tries to write to config.lockpings locally and gets a NotWritablePrimary error&quot;&lt;br/&gt;
&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2050803">SERVER-66588</key>
            <summary>In catalog shard POC the config secondary should be prevented writing</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="13203">Gone away</resolution>
                                        <assignee username="backlog-server-sharding-nyc">[DO NOT USE] Backlog - Sharding NYC</assignee>
                                    <reporter username="andrew.shuvalov@mongodb.com">Andrew Shuvalov</reporter>
                        <labels>
                            <label>sharding-nyc-subteam2</label>
                            <label>sharding-nyc-subteam2-catalog-poc</label>
                    </labels>
                <created>Thu, 19 May 2022 19:09:05 +0000</created>
                <updated>Fri, 27 Oct 2023 20:45:27 +0000</updated>
                            <resolved>Thu, 2 Mar 2023 18:05:15 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5244537" author="jack.mulrow" created="Thu, 2 Mar 2023 18:05:15 +0000"  >&lt;p&gt;Gone away with the changes from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-65891&quot; title=&quot;Make all distLock acquisitions local-only&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-65891&quot;&gt;&lt;del&gt;SERVER-65891&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="4956230" author="jack.mulrow" created="Fri, 4 Nov 2022 19:18:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andrew.shuvalov%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;andrew.shuvalov@mongodb.com&quot;&gt;andrew.shuvalov@mongodb.com&lt;/a&gt;, has this gone away since &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-65891&quot; title=&quot;Make all distLock acquisitions local-only&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-65891&quot;&gt;&lt;del&gt;SERVER-65891&lt;/del&gt;&lt;/a&gt; was finished?&lt;/p&gt;</comment>
                            <comment id="4561404" author="kaloian.manassiev" created="Fri, 20 May 2022 06:30:33 +0000"  >&lt;p&gt;Just FYI that we should be able at this point to throw out the DistLock if this is what is causing you problems. If rather than investigating how to prevent secondaries from doing writes you just threw out the DistLock for this POC, that might save you some time.&lt;/p&gt;</comment>
                    </comments>
                    <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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25134"><![CDATA[Sharding NYC]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 20 May 2022 06:30:33 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        48 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2290</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>
                            48 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-sharding-nyc</customfieldvalue>
            <customfieldvalue>andrew.shuvalov@mongodb.com</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0vkgf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0egqw:</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_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

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

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