<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:39:49 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>[DOCS-923] Document driver support for duplicate BSON keys</title>
                <link>https://jira.mongodb.org/browse/DOCS-923</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;Most MongoDB drivers have a native representation of BSON documents as a dictionary or hash structure that does not support duplicate keys.&lt;/p&gt;

&lt;p&gt;This can be an issue when trying to read from the oplog; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1606&quot; title=&quot;Oplog entries contain repeated fields ($set)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1606&quot;&gt;&lt;del&gt;SERVER-1606&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It might be helpful to have a page documenting driver support &amp;amp; example usage.&lt;/p&gt;</description>
                <environment></environment>
        <key id="60108">DOCS-923</key>
            <summary>Document driver support for duplicate BSON keys</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="9">Done</resolution>
                                        <assignee username="sam.kleinman">Sam Kleinman</assignee>
                                    <reporter username="stephen.steneker@mongodb.com">Stennie Steneker</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Dec 2012 05:07:28 +0000</created>
                <updated>Mon, 30 Oct 2023 21:57:53 +0000</updated>
                            <resolved>Thu, 3 Jan 2013 23:15:36 +0000</resolved>
                                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>manual</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="230423" author="auto" created="Thu, 3 Jan 2013 23:13:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-01-03T23:12:31Z&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-923&quot; title=&quot;Document driver support for duplicate BSON keys&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-923&quot;&gt;&lt;del&gt;DOCS-923&lt;/del&gt;&lt;/a&gt;: duplicate field name note&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/ab22a79332125722d229258ce358249e7fc7c3fe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/ab22a79332125722d229258ce358249e7fc7c3fe&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="225843" author="davec" created="Fri, 28 Dec 2012 04:05:58 +0000"  >&lt;p&gt;Thanks Scott.  toMap().entrySet() seems to give me the data.&lt;/p&gt;

&lt;p&gt;I saw the change to the oplog format is scheduled for 2.5 (prod-ready 2.6) which I&apos;m assuming is a long way off given the amount of time it took to go from 2.0 to 2.2.  So I won&apos;t be stuck on 2.2.0 forever, I&apos;m going through the pain now of converting my code from C# to Java and using IKVM to run the Java code under .NET so I don&apos;t have to deploy under two runtimes since the rest of my application is .NET.  The more information about these sorts of discrepancies between drivers that can be known up front, the better, as this one really bit us.&lt;/p&gt;

&lt;p&gt;Thanks again for your help.&lt;/p&gt;</comment>
                            <comment id="225610" author="scotthernandez" created="Thu, 27 Dec 2012 21:18:19 +0000"  >&lt;p&gt;Dave, if you use the entrySet() method then you will get back all pairs, with their actual data. This is not the purpose of that class but because of the way it is implemented it works. I also have another implementation which will combine multiple repeats like {$set:&lt;/p&gt;
{a:1}
&lt;p&gt;, $set:{b:1}} into {$set:{a:1, b:1}} which can be used in java, but is not generally useful nor efficient since it has to extra work to track fields at each level.&lt;/p&gt;

&lt;p&gt;We will document this behavior and we are going to change the oplog format (probably collecting all fields in each repeated field into one) to produce something easily consumable to all languages in a version in the short-term future (currently scheduled for 2.5.x I believe).&lt;/p&gt;</comment>
                            <comment id="225598" author="davec" created="Thu, 27 Dec 2012 21:02:07 +0000"  >&lt;p&gt;LazyDBObject gets past the error and lets you parse these oplog documents, but it appears that it will replace the values as it parses the document and finds elements that repeat the same key.  As a result, you&apos;ll get a partial document, with the value for the duplicate key that was set last.  This isn&apos;t optimal, but a broken parser is better than no parser at all.&lt;/p&gt;

&lt;p&gt;Scott, I think it would be helpful if these driver limitations were documented.  While the oplog format is internal, Eliot said that this is valid BSON data, and only the C++ driver is capable of handling it.  It seems possible that users would store data in a document using one driver that couldn&apos;t be read by other drivers.  The oplog appears to be one case of this occurring, but if anyone could do that, then knowing the capabilities of other drivers in this regard would be very helpful.&lt;/p&gt;</comment>
                            <comment id="222000" author="scotthernandez" created="Sat, 22 Dec 2012 06:10:11 +0000"  >&lt;p&gt;We should not document this as it is internal and we should simply wait till it is fixed. If anything, and note that using anything other than C++ is a problem is enough.&lt;/p&gt;

&lt;p&gt;Stephen, have you tested that the LazyDBObject works in all case, or even common ones? I don&apos;t think it does what you think it does.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="12738">SERVER-1606</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="58657">SERVER-7871</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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 22 Dec 2012 06:10:11 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 6 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>davec</customfieldvalue>
            <customfieldvalue>sam.kleinman</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
            <customfieldvalue>stephen.steneker@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrs4tj:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>37556</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hryhmn:</customfieldvalue>

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