<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:47:47 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-59659] Investigate allowing the change stream oplog query to run using the pipeline collation</title>
                <link>https://jira.mongodb.org/browse/SERVER-59659</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Change streams have always &lt;a href=&quot;https://github.com/mongodb/mongo/blob/9dd93503190332d7518634bb49bde9a8edb93244/src/mongo/db/pipeline/pipeline_d.cpp#L1096-L1102&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;prevented a user-defined collation from being applied to the filter pushed down into the oplog&lt;/a&gt;, primarily so that a case-insensitive collation cannot cause a single-collection stream to return events from multiple similarly-named collections (see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-31443&quot; title=&quot;$changeStream pipelines should support non-simple collations&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-31443&quot;&gt;&lt;del&gt;SERVER-31443&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;This became an issue during PM-1942, since we are now rewriting user filters into the oplog, and the user may have specified a collation for their &lt;tt&gt;$match&lt;/tt&gt; filters. We therefore chose, in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-59426&quot; title=&quot;Do not mix collations during change stream rewrites&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-59426&quot;&gt;&lt;del&gt;SERVER-59426&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-59840&quot; title=&quot;Make change stream mixed-collator check more robust&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-59840&quot;&gt;&lt;del&gt;SERVER-59840&lt;/del&gt;&lt;/a&gt;, to abandon any attempt to rewrite the user&apos;s query if they have requested a non-simple collation. This behavior ensures that a user collation does not get applied to the oplog query, which could have unintended consequences.&lt;/p&gt;

&lt;p&gt;However, in practice the changes in&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56872&quot; title=&quot;Add optimization function to apply $match predicates on change streams events directly to oplog entry&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56872&quot;&gt;&lt;del&gt;SERVER-56872&lt;/del&gt;&lt;/a&gt; should actually make the oplog query collation-agnostic. All predicates on namespace fields now use regexes, which ignore the collation. The remaining predicates all operate on fields that cannot have a string value or fields whose values belong to a limited set of strings that cannot be confused for each other by any collation (e.g., the &quot;op&quot; field).&lt;/p&gt;

&lt;p&gt;It may therefore now be safe to allow the oplog query to have an arbitrary collation.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1862265">SERVER-59659</key>
            <summary>Investigate allowing the change stream oplog query to run using the pipeline collation</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="justin.seyster@mongodb.com">Justin Seyster</reporter>
                        <labels>
                    </labels>
                <created>Sat, 28 Aug 2021 00:10:19 +0000</created>
                <updated>Mon, 6 Mar 2023 10:24:21 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4098274" author="bernard.gorman" created="Sun, 3 Oct 2021 21:28:29 +0000"  >&lt;p&gt;Note that one consideration here is that we would have to prevent any of our oplog rewrites from converting a user-defined string equality filter into a regex, since that would cause the predicate to incorrectly ignore the collation. For instance, we currently rewrite &lt;a href=&quot;https://github.com/mongodb/mongo/blob/9dd93503190332d7518634bb49bde9a8edb93244/src/mongo/db/pipeline/change_stream_rewrite_helpers.cpp#L686-L700&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;some string-equality predicates on field &lt;tt&gt;&apos;ns&apos;&lt;/tt&gt; into a regex here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While this isn&apos;t critical - very few people are likely to run change streams with a non-simple collation - it would be nice to get rid of this restriction and the &lt;tt&gt;temporarilyChangeCollator&lt;/tt&gt; &quot;workaround&quot; along with it, since &lt;a href=&quot;https://github.com/mongodb/mongo/blob/9dd93503190332d7518634bb49bde9a8edb93244/src/mongo/db/pipeline/pipeline_d.cpp#L1096-L1102&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this mechanism only exists because of change streams and is not used anywhere else in the server&lt;/a&gt;. As a (less desirable) alternative, if it is not feasible to simply allow the user collation to be applied to the oplog query, we could selectively permit predicates on collation-agnostic fields as outlined in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-59660&quot; title=&quot;Allow change stream rewrites for $match with non-simple collation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-59660&quot;&gt;&lt;del&gt;SERVER-59660&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I&apos;d suggest placing this ticket in the QO Quick Wins bucket.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="1862268">SERVER-59660</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1862268">SERVER-59660</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>1.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 3 Oct 2021 21:28:29 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 18 weeks, 3 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-1951</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>
                            2 years, 18 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-optimization</customfieldvalue>
            <customfieldvalue>bernard.gorman@mongodb.com</customfieldvalue>
            <customfieldvalue>justin.seyster@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzkx3:</customfieldvalue>

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

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