<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:54:15 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-62131] Ensure correctness of ChunkWritesTracker metrics</title>
                <link>https://jira.mongodb.org/browse/SERVER-62131</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/fcd93d3668831df603399b2132260635cfe89ec7/src/mongo/s/chunk_writes_tracker.h#L37&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ChunkWritesTracker&lt;/a&gt; objects are instantiated on shards to track the number of bytes that are being written on every owned chunk; the metric is then used to trigger the chunk splitter when a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/5bbadc66ed462aed3cc4f5635c5003da6171c25d/src/mongo/s/chunk_writes_tracker.cpp#L50-L51&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sufficient number&lt;/a&gt; (&lt;a href=&quot;https://github.com/mongodb/mongo/blob/5bbadc66ed462aed3cc4f5635c5003da6171c25d/src/mongo/s/chunk_writes_tracker.h#L39-L43&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;threshold&lt;/a&gt; probably to review) of bytes have been written to a chunk.&lt;/p&gt;

&lt;p&gt;Currently, the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/fcd93d3668831df603399b2132260635cfe89ec7/src/mongo/s/chunk_writes_tracker.h#L83-L87&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;bytesWritten&lt;/a&gt; counter:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/7879dd15deaa37f1f3a53a46e9877ef6b03b2f97/src/mongo/db/s/shard_server_op_observer.cpp#L301&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Is incremented when a new document is inserted&lt;/a&gt; &#9989;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/7879dd15deaa37f1f3a53a46e9877ef6b03b2f97/src/mongo/db/s/shard_server_op_observer.cpp#L445&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Is incremented when a document gets updated&lt;/a&gt; &#10060; wrong because the increment/decrement should take into account the bytes diff between the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/fcd93d3668831df603399b2132260635cfe89ec7/src/mongo/db/catalog/collection.h#L81-82&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;old document&lt;/a&gt; and its &lt;a href=&quot;https://github.com/mongodb/mongo/blob/fcd93d3668831df603399b2132260635cfe89ec7/src/mongo/db/catalog/collection.h#L84-L85&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;updated version&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;Does not change on deletes &#10060; wrong because the counter must take into account removed documents and be decremented.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Objective of this ticket is correcting the metrics in order to avoid scheduling chunk splitting tasks too much or too early. Currently, the two main problems we can incur under some conditions are:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Unnecessary load on the CPU (a lot of noop split tasks).&lt;/li&gt;
	&lt;li&gt;Eagerness to split (in case of the new auto-splitter, continuously try to splitt a chunk so that when it gets exactly at 133% maxChunkSize it is split right away in two chunks of &lt;a href=&quot;https://github.com/mongodb/mongo/blob/fcd93d3668831df603399b2132260635cfe89ec7/src/mongo/db/s/auto_split_vector.h#L58&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;67% maxChunkSize&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1952972">SERVER-62131</key>
            <summary>Ensure correctness of ChunkWritesTracker metrics</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="backlog-server-sharding-emea">[DO NOT USE] Backlog - Sharding EMEA</assignee>
                                    <reporter username="pierlauro.sciarelli@mongodb.com">Pierlauro Sciarelli</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 Dec 2021 11:07:07 +0000</created>
                <updated>Tue, 6 Dec 2022 00:43:18 +0000</updated>
                            <resolved>Tue, 26 Apr 2022 16:12:55 +0000</resolved>
                                                                                        <votes>2</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="4507121" author="pierlauro.sciarelli" created="Tue, 26 Apr 2022 16:12:56 +0000"  >&lt;p&gt;Closing as &quot;Won&apos;t fix&quot; because under the &quot;No more auto splitter&quot; project the the auto splitter is going away and subsequently the &lt;tt&gt;ChunkWritesTracker&lt;/tt&gt; as well. And we realistically on&apos;t expect to target the described problem in older versions as it&apos;s not a correctness bug.&lt;/p&gt;</comment>
                            <comment id="4270895" author="kaloian.manassiev" created="Thu, 30 Dec 2021 12:58:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pierlauro.sciarelli&quot; class=&quot;user-hover&quot; rel=&quot;pierlauro.sciarelli&quot;&gt;pierlauro.sciarelli&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tommaso.tocci&quot; class=&quot;user-hover&quot; rel=&quot;tommaso.tocci&quot;&gt;tommaso.tocci&lt;/a&gt;: The ChunkWritesTracker has behaved like it does since the dawn of time. Is there something that changed recently that made this behaviour worse that we have to fix it, or are you just proposing an improvement here? I am thinking that if it is the latter, we should move it under the No More Autosplitter project.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25133"><![CDATA[Sharding EMEA]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K000011BAByQAO]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 30 Dec 2021 12:58:22 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 41 weeks, 1 day 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-2323</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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 41 weeks, 1 day 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>backlog-server-sharding-emea</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>pierlauro.sciarelli@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0ezpr:</customfieldvalue>

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

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