<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:54:53 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-40406] Add support for &apos;$$NOW&apos; and &apos;$$CLUSTER_TIME&apos; within the update command</title>
                <link>https://jira.mongodb.org/browse/SERVER-40406</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This will likely involve accepting an additional argument to the update command, like we do &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1d8ddd2d2d480bc0b840b506c3630c82be8c09a2/src/mongo/db/pipeline/aggregation_request.cpp#L242-L248&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;for &apos;runtimeConstants&apos; in aggregate&lt;/a&gt;. It will also involve propagating those constants from the update command on mongos or generating them on mongod in unsharded deployments. &lt;/p&gt;</description>
                <environment></environment>
        <key id="727011">SERVER-40406</key>
            <summary>Add support for &apos;$$NOW&apos; and &apos;$$CLUSTER_TIME&apos; within the update command</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="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="bernard.gorman@mongodb.com">Bernard Gorman</assignee>
                                    <reporter username="charlie.swanson@mongodb.com">Charlie Swanson</reporter>
                        <labels>
                    </labels>
                <created>Mon, 1 Apr 2019 14:54:11 +0000</created>
                <updated>Sun, 29 Oct 2023 22:22:28 +0000</updated>
                            <resolved>Fri, 17 May 2019 15:32:14 +0000</resolved>
                                                    <fixVersion>4.1.12</fixVersion>
                                    <component>Aggregation Framework</component>
                    <component>Write Ops</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3919243" author="JIRAUSER1257919" created="Tue, 6 Jul 2021 21:23:08 +0000"  >&lt;p&gt;It seems that only the update with aggregation pipeline can use &lt;em&gt;$$NOW&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Could it also be supported in the &quot;classical&quot; update (with update operators) ?&lt;/b&gt;&#160;&lt;/p&gt;


&lt;p&gt;I know &lt;em&gt;$currentDate&lt;/em&gt; exists, but we cannot use it combined with another update operator (&lt;em&gt;$setOnInsert&lt;/em&gt;, &lt;em&gt;$push&lt;/em&gt;, ...) and sometime, using an&#160;update with aggregation pipeline would be unfavorable.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;ins&gt;Example of use case :&lt;/ins&gt;&lt;/b&gt;&#160;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;We want to do an upsert, with a field &quot;creation-time&quot;, generated server-side.&lt;/li&gt;
	&lt;li&gt;The document contains an array where elements are added one by one (e.g. an array of events).&lt;/li&gt;
	&lt;li&gt;We want to watch, with a Change Stream, the changes on the array.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If we use an&#160;update with aggregation pipeline, each insertion of elements in the array with $concatArray will triggers an event containing all the content of the array.&#160;&lt;br/&gt;
When the array can go up to several MB, this method quickly becomes a non-starter.&lt;/p&gt;

&lt;p&gt;Note (if you are curious of my specific use case) : the &quot;creation-time&quot; is needed because we want to atomically (with only one operation) adds elements to an array in a &quot;chunk&quot; (or create one if chunk size is already at the limit), while allowing to retrieve the chunks in order. This would allow us to have an array of subdocuments (events) unrestricted to the 16 MB limit, while allowing to use a change stream to retrieve the events&apos; data.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="2250441" author="xgen-internal-githook" created="Fri, 17 May 2019 15:24:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;bernard.gorman@gmail.com&apos;, &apos;name&apos;: &apos;Bernard Gorman&apos;, &apos;username&apos;: &apos;gormanb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40406&quot; title=&quot;Add support for &amp;#39;$$NOW&amp;#39; and &amp;#39;$$CLUSTER_TIME&amp;#39; within the update command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40406&quot;&gt;&lt;del&gt;SERVER-40406&lt;/del&gt;&lt;/a&gt; Add support for $$NOW and $$CLUSTER_TIME in the update command&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c7f86d2fce5ad0145b57007f83584cf96d02d9d4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c7f86d2fce5ad0145b57007f83584cf96d02d9d4&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="725206">SERVER-40381</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="766558">SERVER-41115</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="727164">SERVER-40419</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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.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, 13 May 2019 13:43:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 31 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-40381'>SERVER-40381</a></s>]]></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-1394</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>
                            2 years, 31 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>adrian.blandin@sovo-tech.com</customfieldvalue>
            <customfieldvalue>bernard.gorman@mongodb.com</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|husjvb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr7kvb:</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="2842">Query 2019-05-20</customfieldvalue>
    <customfieldvalue id="2843">Query 2019-06-03</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|hus64n:</customfieldvalue>

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