<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:29:12 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-32102] Audit tests in change_streams_secondary_reads suite for assumptions of causally consistent getMores</title>
                <link>https://jira.mongodb.org/browse/SERVER-32102</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;There are change streams tests that assume getMore will see previous writes, performed after the cursor is established. For example, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/734205a1/jstests/change_streams/lookup_post_image.js#L112&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this assertion&lt;/a&gt; in lookup_post_image.js expects to see a delete performed, but this is not a valid assertion. This suite loads &lt;tt&gt;jstests/libs/override_methods/set_read_and_write_concerns.js&lt;/tt&gt;, so the delete was performed with write concern level &quot;majority&quot;, and the cursor was established with read concern level &quot;majority&quot; - but this is not enough to be certain the read can see the write when targeted to a secondary. There are two problems here:&lt;/p&gt;

&lt;p&gt;First, the write concern of &quot;majority&quot; will ensure the write is applied to the oplog of the secondary, but will not necessarily wait for it to become part of the majority-committed snapshot on the secondary.&lt;/p&gt;

&lt;p&gt;Second, the read concern is only enforced at the time of cursor establishment and any subsequent getMore will not wait for read concern. One idea of how to fix problems like this is to turn on causal consistency, but that wouldn&apos;t work for cases like this because of this read concern behavior. A readConcern &apos;afterClusterTime&apos; would/should not be sent with a getMore, so there&apos;s no way to force the getMore to wait until the previous write was visible. This does not affect this particular assertion, since it is inspecting the result of an update lookup which issues a separate query with its own read concern to do the lookup, but this could be an issue elsewhere in this suite.&lt;/p&gt;</description>
                <environment></environment>
        <key id="464735">SERVER-32102</key>
            <summary>Audit tests in change_streams_secondary_reads suite for assumptions of causally consistent getMores</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-query">Backlog - Query Team</assignee>
                                    <reporter username="james.wahlin@mongodb.com">James Wahlin</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Nov 2017 16:22:04 +0000</created>
                <updated>Tue, 6 Dec 2022 03:45:53 +0000</updated>
                            <resolved>Fri, 1 Dec 2017 15:52:48 +0000</resolved>
                                    <version>3.6.0-rc5</version>
                                                    <component>Aggregation Framework</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1739091" author="spencer" created="Thu, 30 Nov 2017 23:50:59 +0000"  >&lt;p&gt;I filed &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32131&quot; title=&quot;ChangeStreams lookup_post_image.js test makes assumptions that don&amp;#39;t hold up in secondary read passthrough&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32131&quot;&gt;&lt;del&gt;SERVER-32131&lt;/del&gt;&lt;/a&gt; to fix the specific issue with lookup_post_image.js, but unfortunately don&apos;t feel like the replication team has time to perform a full audit of the changestreams tests at the moment.  If more build failures like this continue to surface we may have to re-evaluate that, but in the meantime if the query team wants to perform this audit that&apos;d be great, but if not then I think we should close this ticket for now until/unless more issues like this come up.&lt;/p&gt;</comment>
                            <comment id="1737418" author="milkie" created="Wed, 29 Nov 2017 16:12:20 +0000"  >&lt;p&gt;LGTM&lt;/p&gt;</comment>
                            <comment id="1737399" author="charlie.swanson" created="Wed, 29 Nov 2017 16:07:11 +0000"  >&lt;p&gt;Ok I attempted to clean up the description a bit - how does it look now?&lt;/p&gt;</comment>
                            <comment id="1737389" author="milkie" created="Wed, 29 Nov 2017 15:56:26 +0000"  >&lt;p&gt;Yes, that will clear it all up.  Thanks!&lt;/p&gt;</comment>
                            <comment id="1737363" author="charlie.swanson" created="Wed, 29 Nov 2017 15:47:59 +0000"  >&lt;p&gt;Thanks for that clarification &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=milkie&quot; class=&quot;user-hover&quot; rel=&quot;milkie&quot;&gt;milkie&lt;/a&gt;. With regard to you confusion about this sentence:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;First, the write concern of &quot;majority&quot; will ensure the write is applied to the oplog of the secondary, but will not necessarily wait for it to become part of the majority-committed snapshot.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Would it make sense if it ended with &quot;on the secondary&quot;? I think that&apos;s what we intended.&lt;/p&gt;</comment>
                            <comment id="1737172" author="milkie" created="Wed, 29 Nov 2017 12:38:47 +0000"  >&lt;blockquote&gt;&lt;p&gt;First, the write concern of &quot;majority&quot; will ensure the write is applied to the oplog of the secondary, but will not necessarily wait for it to become part of the majority-committed snapshot.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That sentence confuses me.  It is talking about both a primary and secondary, but then says &quot;the&quot; majority-committed snapshot.  There are different majority-committed snapshots on the primary and the secondary; which one is being referred to here?&lt;/p&gt;</comment>
                            <comment id="1737171" author="milkie" created="Wed, 29 Nov 2017 12:36:53 +0000"  >&lt;p&gt;readConcern level majority can indeed block.  It blocks when the catalog cache does not match the catalog on disk.  This is our stopgap solution to not having a versioned catalog.&lt;br/&gt;
For example, what can happen is that an index is dropped.  At that point, the index drop code sets a &quot;minimumVisibleSnapshot&quot; on the Collection.  Thereafter, any read concern majority reads check this value at the time the Collection is opened (usually when acquiring a read lock on the collection), and if the value is not at the time we are reading, we block and wait for the majority snapshot to move past the minimum snapshot value.  After that time, the catalog on disk will match the catalog cache again.&lt;br/&gt;
All catalog metadata manipulation commands, including subtle ones like the compact command, set the minimum snapshot value.&lt;/p&gt;</comment>
                            <comment id="1736853" author="spencer" created="Tue, 28 Nov 2017 23:18:32 +0000"  >&lt;p&gt;Ooph, I&apos;m not actually sure what that code does.  Looks somehow related to index catalog management.  &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=milkie&quot; class=&quot;user-hover&quot; rel=&quot;milkie&quot;&gt;milkie&lt;/a&gt; should know better.  Either way I believe that 99% of the time that should be a no-op.&lt;/p&gt;</comment>
                            <comment id="1736791" author="charlie.swanson" created="Tue, 28 Nov 2017 22:35:49 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=spencer&quot; class=&quot;user-hover&quot; rel=&quot;spencer&quot;&gt;spencer&lt;/a&gt; sorry if I&apos;m phrasing it incorrectly - the point of the last paragraph is just to say that we have to watch out for issues like the one seen in BF-6485 where a find, insert, getMore is expected to see the insert in the next getMore. This is not expected, even with causal consistency enabled. Since many of these tests use that pattern (open change stream, do writes, observe writes in getMores), it seems worth a check for that kind of issue.&lt;/p&gt;

&lt;p&gt;As an aside - I am confused by &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.6.0-rc0/src/mongo/db/db_raii.cpp#L196&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this code&lt;/a&gt; if there is no &apos;waiting&apos; for read concern. Can you elaborate on what that process is doing and why it&apos;s not considered waiting? Or perhaps this only happens in rare circumstances?&lt;/p&gt;</comment>
                            <comment id="1736779" author="spencer" created="Tue, 28 Nov 2017 22:28:05 +0000"  >&lt;p&gt;The last paragraph of the description doesn&apos;t make sense to me as there is no &quot;waiting&quot; involved in satisfying readConcern:majority.  All readConcern:majority does is inform the storage system what version of documents to return.&lt;/p&gt;

&lt;p&gt;Additionally, I believe this issue only applies to tests that are doing multiple writes, then using updateLookup in the stream and expecting the looked-up document to reflect the writes that happened after the update that generated the notification.  &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=james.wahlin&quot; class=&quot;user-hover&quot; rel=&quot;james.wahlin&quot;&gt;james.wahlin&lt;/a&gt; or &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt;, could one of you clean up the ticket description to make that more clear?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="466162">SERVER-32131</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="440972">SERVER-31404</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>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 28 Nov 2017 22:28:05 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 10 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>

                        </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-query</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>james.wahlin@mongodb.com</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|htl07z:</customfieldvalue>

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

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