<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:59:21 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-3333] Change Events: fullDocument field is unexpectedly NULL</title>
                <link>https://jira.mongodb.org/browse/JAVA-3333</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;We would like to report an issue where fullDocument field in ChangeEvent is not being populated&#160;every time&#160;and is NULL at times, for &apos;Update&apos; operation type.&lt;br/&gt;
Can you please let us know if it is an issue in MongoDB or it is expected to be NULL in certain scenarios (apart from when document is deleted or collection is dropped or renamed)?&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;b&gt;Environment Details:&lt;/b&gt;&lt;br/&gt;
mongos: 3 servers (with 3 config servers)&lt;br/&gt;
mongod: 3 sharded replica sets, with each having one primary, two secondaries, and one arbiter&lt;br/&gt;
Mongo version: 4.0.5&lt;br/&gt;
Client Java Driver version: 3.10.1&lt;br/&gt;
&#160;&lt;br/&gt;
Write concern: w:1 (default)&lt;br/&gt;
Read preference: Primary&lt;br/&gt;
Read concern: Not configured (default)&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;b&gt;Operations:&lt;/b&gt;&lt;br/&gt;
Insert a document with TxId:1234&lt;br/&gt;
Update-1 on inserted document&lt;br/&gt;
Update-2 on inserted document&lt;br/&gt;
Update-3 on inserted document&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;b&gt;Issue:&lt;/b&gt;&#160;&lt;br/&gt;
Client is rightly receiving the Insert events and is able to find the document in fullDocument field,&lt;br/&gt;
However it&#160;is not finding document in every&#160;&lt;b&gt;update change event in fullDocument field, and at times it is NULL&lt;/b&gt;&lt;br/&gt;
&#160;&lt;br/&gt;
Connector watches change streams for Insert and Update events&lt;br/&gt;
mongoCollection = mongoClient.getDatabase(mongodb_database).getCollection(mongodb_collection) .withReadPreference(ReadPreference.primary());&lt;br/&gt;
cursor =&#160;mongoCollection.watch(pipeline).fullDocument(FullDocument.UPDATE_LOOKUP).iterator();&lt;br/&gt;
&#160;&lt;br/&gt;
In poll method:&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160;&#160; ChangeStreamDocument&amp;lt;Document&amp;gt; next = cursor.tryNext();&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160;&#160; if (null != next) {&lt;br/&gt;
&lt;font color=&quot;#ff0000&quot;&gt;Document fullDocument = next.getFullDocument();&lt;/font&gt;&lt;br/&gt;
&#160; (This field is NULL)&lt;br/&gt;
&#160;&lt;br/&gt;
Questions:&lt;br/&gt;
1.&#160;As per documentation we found, fullDocument is expected to be null when a document is deleted or a collection is dropped or renamed, but in our cases, neither of this is done.&lt;br/&gt;
We would like to understand why this field isn&apos;t being populated.&lt;br/&gt;
&#160;&lt;br/&gt;
2. As write and reads are from primary, and change event being generated inherently after &apos;majority&apos; commit, is there a possibility that reads might be going to secondary?&lt;br/&gt;
&#160;&lt;br/&gt;
3. We have a similar infrastructure with Mongo version 3.6, and are not observing these issues. &#160;Can you share if any changes with migration to 4.0.5 are causing this?&lt;/p&gt;</description>
                <environment>mongos: 3 servers (with 3 config servers) &lt;br/&gt;
mongod: 3 sharded replica sets, with each having one primary, two secondaries, and one arbiter &lt;br/&gt;
Mongo version: 4.0.5 &lt;br/&gt;
Client Java Driver version: 3.10.1</environment>
        <key id="813686">JAVA-3333</key>
            <summary>Change Events: fullDocument field is unexpectedly NULL</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="3">Duplicate</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="vivek.nag">Vivek Nag Motamarri</reporter>
                        <labels>
                    </labels>
                <created>Tue, 25 Jun 2019 14:28:57 +0000</created>
                <updated>Wed, 14 Jul 2021 00:10:41 +0000</updated>
                            <resolved>Mon, 1 Jul 2019 10:00:31 +0000</resolved>
                                    <version>3.10.1</version>
                                                    <component>Change Streams</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2306443" author="ross@10gen.com" created="Mon, 1 Jul 2019 10:00:31 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vivek.nag&quot; class=&quot;user-hover&quot; rel=&quot;vivek.nag&quot;&gt;vivek.nag&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;This isn&apos;t a Java driver issue, but rather a server issue, as such closing as a duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41904&quot; title=&quot;Change Events: fullDocument field is unexpectedly NULL&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41904&quot;&gt;&lt;del&gt;SERVER-41904&lt;/del&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Please follow / watch that ticket for updates.&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="2305939" author="asya" created="Sun, 30 Jun 2019 11:16:47 +0000"  >&lt;p&gt;Looks like duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41904&quot; title=&quot;Change Events: fullDocument field is unexpectedly NULL&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41904&quot;&gt;&lt;del&gt;SERVER-41904&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="813593">SERVER-41904</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000wXr7DQAS]]]></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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|huw3sv:</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>