<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:25:00 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-30784] Allow sharded change streams to target just the shards that have chunks</title>
                <link>https://jira.mongodb.org/browse/SERVER-30784</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently change streams on sharded collections target all shards in the cluster, regardless of which shards actually have data for that collection.  In order for change streams to target just the shards that have chunks, there are a few things we need.&lt;br/&gt;
First we need to be able to reconstruct the routing table at any point in the past, so that when we resume a stream we can know which shards had chunks at the time that the stream is resuming from.&lt;br/&gt;
Second, we need chunk migration commit to be a multi-document transaction.  If the donor shard recorded a chunk migration commit operation with &lt;b&gt;the same optime&lt;/b&gt; as the chunk migration commit operation on the config server, then when a change stream encounters that commit operation on the donor shard, it could use the multi-version routing table to tell whether the recipient shard had any other chunks for that collection as of the time of the commit and if not it could close its change stream cursor to force mongos to retarget.  We could then remove the no-op oplog entry we currently log on the donor shard when we migrate a chunk to a shard that has no chunks for that collection.&lt;/p&gt;</description>
                <environment></environment>
        <key id="419132">SERVER-30784</key>
            <summary>Allow sharded change streams to target just the shards that have chunks</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-optimization">Backlog - Query Optimization</assignee>
                                    <reporter username="spencer@mongodb.com">Spencer Brody</reporter>
                        <labels>
                            <label>change-streams-improvements</label>
                            <label>changestreams</label>
                    </labels>
                <created>Tue, 22 Aug 2017 22:34:52 +0000</created>
                <updated>Mon, 28 Aug 2023 20:17:14 +0000</updated>
                                                                            <component>Querying</component>
                    <component>Replication</component>
                    <component>Sharding</component>
                                        <votes>2</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="1655463" author="spencer" created="Wed, 23 Aug 2017 20:14:37 +0000"  >&lt;p&gt;It might be possible to do this without making chunk migration commit a true multi-doc transaction with the same commit time on all involved parties (donor, recipient, config server).  Currently we log an oplog entry on the donor shard when entering the critical section for a migration that moves a chunk to a shard that has no chunks for that collection.  The thing that prevents us from targeting just the shards that have chunks right now is that when we encounter that oplog entry and send a retryNeeded notification to the mongos, at that point the migration still might not have committed, so the mongos may reload its routing table but still not discover that it needs to add a cursor to the new shard.  To fix this we could make it so that the change stream on the donor shard blocks when it encounters the oplog entry from the beginning of the critical section until it becomes aware that that migration has committed.  Then only after determining that the migration is committed it can return the &apos;retryNeeded&apos; notification to the mongos, using the timestamp from the oplog entry at the beginning of the critical section as the resumeToken to ensure nothing gets missed on the new shard.  Waiting until the donor shard observes that the migration is committed means that the cluster time of the response will be after the migration commit, and thus when the mongos reloads the routing table it is guaranteed to pick up the changes from the migration commit.&lt;/p&gt;</comment>
                            <comment id="1654459" author="spencer" created="Tue, 22 Aug 2017 23:05:43 +0000"  >&lt;p&gt;Once we do this we can stop making sharded change steams start at the timestamp of when the ShardRegistry was last reloaded and can instead rely on the chunk versioning protocol to ensure we have targeted the right set of shards.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="868444">SERVER-42290</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2426792">SERVER-80427</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25126"><![CDATA[Query Optimization]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5006R00001lteelQAA]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 25 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1941</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>kateryna.kamenieva@mongodb.com</customfieldvalue>

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

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

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