<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:19:58 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-29123] Why is ParallelBatchWriterMode used when Applying Oplogs</title>
                <link>https://jira.mongodb.org/browse/SERVER-29123</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In function  OpTime SyncTail::multiApply, ParallelBatchWriterMode is used.&lt;br/&gt;
If primary is writing heavily, the latency of reading slaves will be very unstable. In our production environment, it may be 400 to 1000ms,&lt;br/&gt;
I know that ParallelBatchWriterMode is a global resource lock, which will block every read operation on every collections.&lt;br/&gt;
My question is that: why is it necessary to stop reads on collections other than oplog.rs? &lt;br/&gt;
Why can not a lock on local db satisfy the concurrency model?&lt;/p&gt;</description>
                <environment></environment>
        <key id="382695">SERVER-29123</key>
            <summary>Why is ParallelBatchWriterMode used when Applying Oplogs</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="schwerin@mongodb.com">Andy Schwerin</assignee>
                                    <reporter username="wolf_kdy">deyukong</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 May 2017 12:31:22 +0000</created>
                <updated>Fri, 12 May 2017 00:45:42 +0000</updated>
                            <resolved>Thu, 11 May 2017 17:20:39 +0000</resolved>
                                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1569303" author="wolf_kdy" created="Fri, 12 May 2017 00:45:42 +0000"  >&lt;p&gt;to who is not sensetive to the inconsistent view, but sensetive to the read latency. It depends on the users.&lt;/p&gt;</comment>
                            <comment id="1569170" author="schwerin" created="Thu, 11 May 2017 18:42:36 +0000"  >&lt;p&gt;Acceptable to whom?&lt;/p&gt;</comment>
                            <comment id="1569162" author="wolf_kdy" created="Thu, 11 May 2017 18:32:22 +0000"  >&lt;p&gt;thanks. I have almost the same considerations.&lt;br/&gt;
I think the inconsistent view is acceptable, but I still cant tell if some dangerous side-effect hides somewhere if I simply alter the  PBWM to a dblock or tablelock.&lt;/p&gt;</comment>
                            <comment id="1569112" author="schwerin" created="Thu, 11 May 2017 17:20:15 +0000"  >&lt;p&gt;In order to perform writes with the same throughput as the primary, secondary nodes need to apply writes in parallel, just as primaries do. However, secondaries cannot tell from the information in the oplog what parallelizations will cause clients to always see a consistent view of the data. To work around this, the secondaries apply oplog entries in arbitrarily selected batches, using rules that ensure that at the end of a batch, the view over the data is consistent. However, during the batch application, the view may not be consistent, and so readers must be blocked. The ParallelBatchWriterMode lock is used to perform this synchronization.&lt;/p&gt;

&lt;p&gt;As you have noticed, when there is heavy write load, readers on secondaries can find themselves stuck waiting for batch boundaries to arrive in order to perform reads. This problem is observed in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-21858&quot; title=&quot;A high throughput update workload in a replica set can cause starvation of secondary reads&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-21858&quot;&gt;&lt;del&gt;SERVER-21858&lt;/del&gt;&lt;/a&gt;. However, on storage engines that support MVCC, there is an alternative outlined in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20328&quot; title=&quot;Allow secondary reads while applying oplog entries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20328&quot;&gt;&lt;del&gt;SERVER-20328&lt;/del&gt;&lt;/a&gt;: with some work, we could allow readers on secondaries to read from the view of the data at the end of the most recently competed batch. I would recommend that you watch and vote on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20328&quot; title=&quot;Allow secondary reads while applying oplog entries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20328&quot;&gt;&lt;del&gt;SERVER-20328&lt;/del&gt;&lt;/a&gt;, if you are interested.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="228962">SERVER-20328</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 11 May 2017 17:20:15 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 39 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>wolf_kdy</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 39 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>wolf_kdy</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht7a6v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hszgmv:</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrzq7r:</customfieldvalue>

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