<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:11:03 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-68525] Avoid updating column index unnecessarily</title>
                <link>https://jira.mongodb.org/browse/SERVER-68525</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This ticket is to investigate whether whether we perform unnecessary writes when doing updates with a column index, and to fix such cases.&lt;/p&gt;

&lt;p&gt;Case 1: The column index has a columnstoreProjection, and a field that does not fall into the projection is modified. This should not require us to write to the index at all.&lt;/p&gt;

&lt;p&gt;Case 2: Only one (or a handful) of paths are modified in an update. The unmodified paths should not have to be re-written.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2105225">SERVER-68525</key>
            <summary>Avoid updating column index unnecessarily</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="13202">Works as Designed</resolution>
                                        <assignee username="dianna.hohensee@mongodb.com">Dianna Hohensee</assignee>
                                    <reporter username="ian.boros@mongodb.com">Ian Boros</reporter>
                        <labels>
                            <label>pm2646-m5</label>
                    </labels>
                <created>Wed, 3 Aug 2022 00:01:57 +0000</created>
                <updated>Fri, 27 Oct 2023 13:51:57 +0000</updated>
                            <resolved>Thu, 29 Dec 2022 18:37:41 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5081747" author="dianna.hohensee" created="Thu, 29 Dec 2022 15:56:00 +0000"  >&lt;p&gt;Alright, so &lt;em&gt;I think&lt;/em&gt;, that &lt;b&gt;Case 1&lt;/b&gt; is also handled, by the same code. The &lt;a href=&quot;https://github.com/10gen/mongo/blob/f38ee44ac0b975b2ebb797a309a455a7e2167886/src/mongo/db/index/column_key_generator.cpp#L252-L286&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;same diff&apos;ing code&lt;/a&gt; uses &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ddd926f0951d577caf0cc420dc2c7520b728b63d/src/mongo/db/index/column_key_generator.cpp#L257-L258&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;projection trees to create the ColumnShredders&lt;/a&gt;, and my understanding is that these projection trees are created by thing like &lt;tt&gt;columnstoreProjection&lt;/tt&gt; settings: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e5de3a39cb5825e23b3d03439c88f80aa1656709/src/mongo/db/index/column_key_generator.cpp#L94&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;see here&lt;/a&gt; where we pass the projection into the AST creation. Therefore, the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ddd926f0951d577caf0cc420dc2c7520b728b63d/src/mongo/db/index/column_key_generator.cpp#L257-L258&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ColumnShredders are only going to look at paths of the &lt;tt&gt;oldObj&lt;/tt&gt; and &lt;tt&gt;newObj&lt;/tt&gt; that meet the projection AST&lt;/a&gt;. Therefore, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ddd926f0951d577caf0cc420dc2c7520b728b63d/src/mongo/db/index/column_key_generator.cpp#L273-L274&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;fields that have not changed will not be written out to storage&lt;/a&gt; again &amp;#8211; won&apos;t reach the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ddd926f0951d577caf0cc420dc2c7520b728b63d/src/mongo/db/index/column_key_generator.cpp#L283&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;callback function&lt;/a&gt; to do so.&lt;/p&gt;</comment>
                            <comment id="5078922" author="dianna.hohensee" created="Tue, 27 Dec 2022 21:43:53 +0000"  >&lt;p&gt;Not totally positive (just found it and haven&apos;t tested anything), but I think &lt;b&gt;Case 2&lt;/b&gt; is already covered: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ddd926f0951d577caf0cc420dc2c7520b728b63d/src/mongo/db/index/column_key_generator.cpp#L273-L274&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this code&lt;/a&gt; will do nothing if a path in the old document and the new document have the same cell value, i.e. the field was unmodified. Nothing, I believe, means that the path-cell pair are not passed into a callback lambda that would write them out to storage.&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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 27 Dec 2022 21:43:53 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 5 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-2646</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>
                            1 year, 5 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>ian.boros@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i14unj:</customfieldvalue>

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

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