<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:01:06 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>[JAVA-4045] Change Events with more accurate time value</title>
                <link>https://jira.mongodb.org/browse/JAVA-4045</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;When reading change stream, the change event has time field &quot;clusterTime&quot; in seconds.&lt;/p&gt;

&lt;p&gt;The request is to get a more accurate time, e.g. milliseconds.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.mongodb.com/manual/reference/change-events/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/change-events/&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1648000">JAVA-4045</key>
            <summary>Change Events with more accurate time value</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="13200">Declined</resolution>
                                        <assignee username="valentin.kovalenko@mongodb.com">Valentin Kavalenka</assignee>
                                    <reporter username="oren.zvuluny@qlik.com">O Z</reporter>
                        <labels>
                    </labels>
                <created>Sun, 14 Mar 2021 21:09:45 +0000</created>
                <updated>Fri, 25 Aug 2023 13:31:24 +0000</updated>
                            <resolved>Tue, 16 Mar 2021 02:07:59 +0000</resolved>
                                                                    <component>Change Streams</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3665904" author="JIRAUSER1258163" created="Tue, 16 Mar 2021 02:06:07 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=oren.zvuluny%40qlik.com&quot; class=&quot;user-hover&quot; rel=&quot;oren.zvuluny@qlik.com&quot;&gt;oren.zvuluny@qlik.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;There are two important things to note with regard to the &lt;tt&gt;clusterTime&lt;/tt&gt; (&lt;a href=&quot;https://mongodb.github.io/mongo-java-driver/4.2/apidocs/mongodb-driver-core/com/mongodb/client/model/changestream/ChangeStreamDocument.html#getClusterTime()&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;ChangeStreamDocument.getClusterTime&lt;/tt&gt;&lt;/a&gt;):&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Despite its BSON type is called &lt;tt&gt;Timestamp&lt;/tt&gt;, it is a logical internal timestamp&lt;sup&gt;1&lt;/sup&gt;. It is not associated with a regular &lt;tt&gt;Date&lt;/tt&gt; type (see &lt;a href=&quot;https://docs.mongodb.com/manual/reference/bson-types/#timestamps&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;BSON timestamps&lt;/a&gt;).&lt;/li&gt;
	&lt;li&gt;A driver has no control over the &lt;tt&gt;clusterTime&lt;/tt&gt; value and resolution: the value is controlled by the MongoDB server, the resolution is set as part of the &lt;a href=&quot;https://docs.mongodb.com/manual/reference/bson-types/#timestamps&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;BSON &lt;tt&gt;Timestamp&lt;/tt&gt; specification&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Thus, not only we cannot change the resolution of &lt;tt&gt;clusterTime&lt;/tt&gt;, but also it should not be relevant to applications that use MongoDB. &lt;tt&gt;clusterTime&lt;/tt&gt; should not be interpreted as a physical timestamp. &lt;tt&gt;clusterTime&lt;/tt&gt; from change stream documents should only be used to partially order the reported changes. The order is &lt;a href=&quot;https://mathworld.wolfram.com/PartialOrder.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;partial&lt;/a&gt; and not &lt;a href=&quot;https://mathworld.wolfram.com/TotallyOrderedSet.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;total&lt;/a&gt; because changes caused by the same transaction have the same &lt;tt&gt;clusterTime&lt;/tt&gt;.&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; See &lt;tt&gt;operationTime&lt;/tt&gt; in &lt;a href=&quot;https://docs.mongodb.com/manual/reference/method/db.runCommand/#command-response&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;command response&lt;/a&gt; for more details. But please keep in mind, that despite this &lt;tt&gt;operationTime&lt;/tt&gt; also represents a logical time of a command, its value is different from the one specified in a change stream document.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1705480">SERVER-56730</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hykkbj:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>