<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:21:26 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-9787] Oplog translates &apos;pushAll&apos; to &apos;set&apos;</title>
                <link>https://jira.mongodb.org/browse/SERVER-9787</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I&apos;m watching the oplog for use within my application.  I&apos;m noticing some difference in behavior between 2.2.0 and 2.4.3.  This is the query that&apos;s being run:&lt;/p&gt;

&lt;p&gt;chats.update(&lt;/p&gt;
{ _id: ObjectId(&quot;51a0249adae44c01b0000003&quot;) }
&lt;p&gt;) { &apos;$pushAll&apos;: { messages: [ &lt;/p&gt;
{ _id: ObjectId(&quot;51a3dc72aead18550a000003&quot;), timestamp: new Date(&quot;Mon, 27 May 2013 22:21:38 GMT&quot;), username: &apos;Bob&apos;, message: &apos;hey&apos; }
&lt;p&gt; ] } } {}&lt;/p&gt;

&lt;p&gt;It is generated by Mongoose as the result of pushing to a subdocument and calling model.save().&lt;/p&gt;

&lt;p&gt;In Mongo 2.2.0 this produces the following oplog entry:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/bitmage/5659191&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/bitmage/5659191&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While in Mongo 2.4.3 it produces this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/bitmage/5659209&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/bitmage/5659209&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So it seems the &apos;pushAll&apos; is being transformed into a &apos;set&apos; which pushes out the contents of the entire Array.&lt;/p&gt;

&lt;p&gt;Can someone familiar with this change comment on the reason for it and if this will be changing back?  Definitely doesn&apos;t seem good for my case... this would force my application to figure out the delta, and it also results in a lot of unnecessary data being sent around.&lt;/p&gt;</description>
                <environment>OSX, Ubuntu</environment>
        <key id="76720">SERVER-9787</key>
            <summary>Oplog translates &apos;pushAll&apos; to &apos;set&apos;</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="bitmage">Brandon Mason</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 May 2013 22:57:10 +0000</created>
                <updated>Tue, 28 May 2013 01:02:03 +0000</updated>
                            <resolved>Mon, 27 May 2013 23:38:50 +0000</resolved>
                                    <version>2.4.3</version>
                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="346500" author="scotthernandez" created="Tue, 28 May 2013 01:02:03 +0000"  >&lt;p&gt;The oplog does not capture only the information you are interested in so it is probably not the best tool.&lt;/p&gt;

&lt;p&gt;See these related issues to watch/vote-up: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-124&quot; title=&quot;triggers &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-124&quot;&gt;SERVER-124&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3385&quot; title=&quot;Publish/Subscribe (Message queue) functionality&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3385&quot;&gt;&lt;del&gt;SERVER-3385&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="346485" author="bitmage" created="Tue, 28 May 2013 00:31:48 +0000"  >&lt;p&gt;Thanks Scott, I understand the direction better now.  I am currently relying upon the oplog to monitor the state of my DB models, so it sounds like I may want to transition to a different strategy.  I suppose I&apos;ll look into creating my own out-of-band pubsub for this purpose.&lt;/p&gt;

&lt;p&gt;Is there a supported API for triggers on the Mongo roadmap?&lt;/p&gt;</comment>
                            <comment id="346459" author="scotthernandez" created="Mon, 27 May 2013 23:38:29 +0000"  >&lt;p&gt;This change is required for the oplog entry to be idempotent and fixes issues around corner cases during application, and the initial sync process.&lt;/p&gt;

&lt;p&gt;The format of the oplog entries may change as improvements are made so please consider their format internal to the replication system. If you are reading the oplog the only parts which are user consumable should be the operation type and _id. All other data is internal and subject to change at any time.&lt;/p&gt;

&lt;p&gt;If you want to keep a changelog of your data it is best this be done outside of the oplog (and replication) as its only requirement is consistent data across replicas.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 27 May 2013 23:38:29 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 38 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></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>bitmage</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmruv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrqspb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>70163</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1. chats.insert(&lt;/p&gt;
{messages:[]}
&lt;p&gt;)&lt;br/&gt;
2. chats.update(&lt;/p&gt;
{ _id: ObjectId(&quot;51a0249adae44c01b0000003&quot;) }
&lt;p&gt;, { &apos;$pushAll&apos;: { messages: [ &lt;/p&gt;
{message: &apos;hey&apos;}
&lt;p&gt; ] } }&lt;br/&gt;
3. use local&lt;br/&gt;
4. rs.oplog.find()&lt;/p&gt;</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|ht02br:</customfieldvalue>

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