<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:21:08 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-49895] Expose getLatestOplogTimestamp() in aggregation cursor command responses on oplog</title>
                <link>https://jira.mongodb.org/browse/SERVER-49895</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;ul&gt;
	&lt;li&gt;Add syntax to aggregate command to allow QueryPlannerParams::TRACK_LATEST_OPLOG_TS to be set. Some care must be taken to reject user requests which attempt to set the parameter for a non-oplog namespace.&lt;/li&gt;
	&lt;li&gt;Add Timestamp latestOplogTimestamp to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d6cc68c57520075e53b930625a15d33a18683730/src/mongo/db/query/cursor_response.h&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the CursorResponse type&lt;/a&gt;.
	&lt;ul&gt;
		&lt;li&gt;CursorResponseBuilder::setLatestOplogTimestamp() should likely be called in all the same places CursorResponseBuilder::setPostBatchResumeToken() is being called today.&lt;/li&gt;
		&lt;li&gt;If latestOplogTimestamp.isNull() then omit the field from the cursor command response.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1421054">SERVER-49895</key>
            <summary>Expose getLatestOplogTimestamp() in aggregation cursor command responses on oplog</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="13201">Fixed</resolution>
                                        <assignee username="alex.taskov@mongodb.com">Alexander Taskov</assignee>
                                    <reporter username="max.hirschhorn@mongodb.com">Max Hirschhorn</reporter>
                        <labels>
                            <label>PM-234-M2</label>
                            <label>PM-234-T-oplog-fetch</label>
                            <label>query-work-resharding</label>
                    </labels>
                <created>Sat, 25 Jul 2020 17:54:16 +0000</created>
                <updated>Sun, 29 Oct 2023 22:05:13 +0000</updated>
                            <resolved>Fri, 28 Aug 2020 14:22:42 +0000</resolved>
                                                    <fixVersion>4.7.0</fixVersion>
                                    <component>Aggregation Framework</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3364031" author="xgen-internal-githook" created="Fri, 28 Aug 2020 14:10:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Alex Taskov&apos;, &apos;email&apos;: &apos;alex.taskov@mongodb.com&apos;, &apos;username&apos;: &apos;alextaskov&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-49895&quot; title=&quot;Expose getLatestOplogTimestamp() in aggregation cursor command responses on oplog&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-49895&quot;&gt;&lt;del&gt;SERVER-49895&lt;/del&gt;&lt;/a&gt; Expose getLatestOplogTimestamp() in aggregation cursor command responses on oplog&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/7d915a65b286e535397a5d79bf2109512003bda9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/7d915a65b286e535397a5d79bf2109512003bda9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3307656" author="max.hirschhorn@10gen.com" created="Mon, 27 Jul 2020 16:16:04 +0000"  >&lt;blockquote&gt;
&lt;p&gt;(or if the query wasn&apos;t for the oplog? not sure if that&apos;s an expected case, or a scenario of a misbehaving client)&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/80b4515ccb5cdbab9b1c620b5449777f1d38140c/src/mongo/db/exec/collection_scan.cpp#L80&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CollectionScan invariants that CollectionScanParams::shouldTrackLatestOplogTimestamp can only be set to true for an oplog namespace&lt;/a&gt;. We&apos;ll need to turn that into a uassert() as part of this ticket to add user-facing syntax to enable it.&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;invariant(!_params.shouldTrackLatestOplogTimestamp || collection-&amp;gt;ns().isOplog());&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="3307606" author="daniel.gottlieb@10gen.com" created="Mon, 27 Jul 2020 15:59:50 +0000"  >&lt;blockquote&gt;
&lt;p&gt;The reason why I said to omit the field from the cursor response when latestOplogTimestamp.isNull() is because the find, aggregate, and getMore commands need not bother to check if they are an oplog cursor. latestOplogTimestamp being a non-null Timestamp should automatically imply that.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That&apos;s valuable reasoning, thanks for adding that.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A null timestamp won&apos;t ever be recorded in the oplog so I don&apos;t see how it could ever be an expected state.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Ok good, glad we&apos;re on the same page there.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I don&apos;t see a reason a replica set member started as a standalone couldn&apos;t make use of this feature.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I didn&apos;t mean the second-order interpretation of &quot;standalone&quot;, but rather the natural &quot;node that does not have a real oplog&quot;. I was trying to understand why internal code querying for the latest oplog timestamp when it doesn&apos;t exist shouldn&apos;t be considered an error.&lt;/p&gt;

&lt;p&gt;My interpretation now is that it&apos;s fine for the lower level API to return an error (for example, when the oplog doesn&apos;t exist, or when the document found does not include a &lt;tt&gt;ts&lt;/tt&gt; field) &amp;#8211; but the expected reason the response building code would observe &lt;tt&gt;LatestOplogTimestamp.isNull()&lt;/tt&gt; is simply &quot;TRACK_LATEST_OPLOG_TS&quot; was not set (or if the query wasn&apos;t for the oplog? not sure if that&apos;s an expected case, or a scenario of a misbehaving client).&lt;/p&gt;</comment>
                            <comment id="3307447" author="max.hirschhorn@10gen.com" created="Mon, 27 Jul 2020 15:03:54 +0000"  >&lt;p&gt;A null timestamp won&apos;t ever be recorded in the oplog so I don&apos;t see how it could ever be an expected state. CollectionScan::getLatestOplogTimestamp(), PlanExecutor::getLatestOplogTimestamp(), etc. return a Timestamp and not a boost::optional&amp;lt;Timestamp&amp;gt;.&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// If _params.shouldTrackLatestOplogTimestamp is set and the collection is the oplog, the latest&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// timestamp seen in the collection.  Otherwise, this is a null timestamp.&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Timestamp _latestOplogEntryTimestamp;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The reason why I said to omit the field from the cursor response when latestOplogTimestamp.isNull() is because the find, aggregate, and getMore commands need not bother to check if they are an oplog cursor. latestOplogTimestamp being a non-null Timestamp should automatically imply that.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Is that preemptively defensive (e.g: instead of uasserting on standalones)?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I don&apos;t see a reason a replica set member started as a standalone couldn&apos;t make use of this feature.&lt;/p&gt;</comment>
                            <comment id="3307392" author="daniel.gottlieb@10gen.com" created="Mon, 27 Jul 2020 14:43:03 +0000"  >&lt;blockquote&gt;
&lt;p&gt; If latestOplogTimestamp.isNull() then omit the field from the cursor command response.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Is that preemptively defensive (e.g: instead of uasserting on standalones)? Or would seeing a null timestamp imply an expected state?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1421056">SERVER-49897</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1495263">SERVER-51227</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1578201">SERVER-53534</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 27 Jul 2020 14:43:03 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 23 weeks, 5 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-234</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>
                            3 years, 23 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alex.taskov@mongodb.com</customfieldvalue>
            <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxwslb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxdf93:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="4251">Sharding 2020-09-07</customfieldvalue>

                        </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|hxweun:</customfieldvalue>

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