<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:43 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-629] Corrupted mongo records getting inserted</title>
                <link>https://jira.mongodb.org/browse/JAVA-629</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Mongo records are getting created of type BSON 101. While trying to read the record using ruby gem it fails with the following error&lt;/p&gt;

&lt;p&gt;&quot;No c decoder for this type yet(101)&quot;&lt;/p&gt;

&lt;p&gt;Mongo validate provide the following info&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Mon Aug 27 12:09:19 [conn1] Invalid bson detected in apiPerf.apiResponseData with _id: &quot;&amp;lt;id&amp;gt;&quot;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Mon Aug 27 12:09:19 [conn1] Invalid bson detected in apiPerf.apiResponseData with _id: &quot;&amp;lt;id&amp;gt;&quot;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Mon Aug 27 12:09:19 [conn1] command apiPerf.$cmd command: { validate: &quot;apiResponseData&quot;, full: true } ntoreturn:1 reslen:1424 117ms&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment>Unix</environment>
        <key id="48193">JAVA-629</key>
            <summary>Corrupted mongo records getting inserted</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="pghosh">Paramita Ghosh</reporter>
                        <labels>
                            <label>bson</label>
                            <label>driver</label>
                    </labels>
                <created>Mon, 27 Aug 2012 16:13:09 +0000</created>
                <updated>Tue, 25 Jun 2013 16:51:14 +0000</updated>
                            <resolved>Tue, 11 Sep 2012 01:17:57 +0000</resolved>
                                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="162773" author="jeff.yemin" created="Tue, 11 Sep 2012 01:17:57 +0000"  >&lt;p&gt;It turns out this happens when you try to use a string with embedded nulls as a key inside an embedded object.  &lt;/p&gt;</comment>
                            <comment id="161641" author="pghosh" created="Fri, 7 Sep 2012 15:51:25 +0000"  >&lt;p&gt;This issue is consistent when I try to insert a MultivaluedMap&amp;lt;String, String&amp;gt; in the mongo. I have tried with mongo 2.2 as well with same results. Could you please provide any insight on this. &lt;/p&gt;</comment>
                            <comment id="160383" author="jeff.yemin" created="Wed, 5 Sep 2012 00:16:10 +0000"  >&lt;p&gt;Paramita,&lt;/p&gt;

&lt;p&gt;Sorry to take so long to get back to you.  Though you are using the Java driver, it&apos;s not clear that anything in the driver itself is causing corruption on the server.  Are you able to reliably reproduce this error, and if so, can you provide us source that we can run ourselves?&lt;/p&gt;</comment>
                            <comment id="157042" author="pghosh" created="Mon, 27 Aug 2012 18:06:20 +0000"  >&lt;p&gt;The code which inserts the records&lt;/p&gt;

&lt;p&gt;create(Map&amp;lt;String, Object&amp;gt; body, Map&amp;lt;String, Object&amp;gt; metaData, String collectionName) &lt;/p&gt;
{
        metaData = new HashMap&amp;lt;String, Object&amp;gt;();
        
        //entity is a wrapper object to hold the body and metadata along with id
        &amp;lt;Spring Mongo Template&amp;gt;.insert(entity, collectionName);
    }</comment>
                            <comment id="157037" author="pghosh" created="Mon, 27 Aug 2012 17:54:26 +0000"  >&lt;p&gt;Here is the output from validate(True)&lt;br/&gt;
Mon Aug 27 13:36:06 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2&amp;#93;&lt;/span&gt; CMD: validate apiPerf.apiResponseData&lt;br/&gt;
Mon Aug 27 13:36:06 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2&amp;#93;&lt;/span&gt; Assertion: 10334:Invalid BSONObj size: 1744961536 (0x00000268) first element: llo: ?type=101&lt;br/&gt;
0x10008684d 0x10000b20d 0x10000b5f0 0x100019e9f 0x100019ea7 0x100019ea7 0x100508d8c 0x10050dd51 0x1004e9c47 0x1004eb0d7 0x1004aa954 0x1004ac089 0x1003e8e7f 0x1003ebd1a 0x10060e234 0x10014be52 0x100616f84 0x7fff8ba218bf 0x7fff8ba24b75 &lt;br/&gt;
 0   mongod                              0x000000010008684d _ZN5mongo11msgassertedEiPKc + 333&lt;br/&gt;
 1   mongod                              0x000000010000b20d _ZNK5mongo7BSONObj14_assertInvalidEv + 1101&lt;br/&gt;
 2   mongod                              0x000000010000b5f0 _ZNK5mongo11BSONElement14embeddedObjectEv + 160&lt;br/&gt;
 3   mongod                              0x0000000100019e9f _ZNK5mongo7BSONObj5validEv + 447&lt;br/&gt;
 4   mongod                              0x0000000100019ea7 _ZNK5mongo7BSONObj5validEv + 455&lt;br/&gt;
 5   mongod                              0x0000000100019ea7 _ZNK5mongo7BSONObj5validEv + 455&lt;br/&gt;
 6   mongod                              0x0000000100508d8c _ZN5mongo11ValidateCmd10validateNSEPKcPNS_16NamespaceDetailsERKNS_7BSONObjERNS_14BSONObjBuilderE + 4732&lt;br/&gt;
 7   mongod                              0x000000010050dd51 _ZN5mongo11ValidateCmd3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 401&lt;br/&gt;
 8   mongod                              0x00000001004e9c47 _ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb + 2343&lt;br/&gt;
 9   mongod                              0x00000001004eb0d7 _ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 2615&lt;br/&gt;
 10  mongod                              0x00000001004aa954 _ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 52&lt;br/&gt;
 11  mongod                              0x00000001004ac089 &lt;em&gt;ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1&lt;/em&gt; + 5081&lt;br/&gt;
 12  mongod                              0x00000001003e8e7f _ZN5mongo13receivedQueryERNS_6ClientERNS_10DbResponseERNS_7MessageE + 623&lt;br/&gt;
 13  mongod                              0x00000001003ebd1a _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 1402&lt;br/&gt;
 14  mongod                              0x000000010060e234 _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 148&lt;br/&gt;
 15  mongod                              0x000000010014be52 _ZN5mongo3pms9threadRunEPNS_13MessagingPortE + 754&lt;br/&gt;
 16  mongod                              0x0000000100616f84 thread_proxy + 132&lt;br/&gt;
 17  libsystem_c.dylib                   0x00007fff8ba218bf _pthread_start + 335&lt;br/&gt;
 18  libsystem_c.dylib                   0x00007fff8ba24b75 thread_start + 13&lt;br/&gt;
Mon Aug 27 13:36:06 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2&amp;#93;&lt;/span&gt; Invalid bson detected in apiPerf.apiResponseData with _id: &amp;lt;id&amp;gt;&lt;/p&gt;</comment>
                            <comment id="157031" author="scotthernandez" created="Mon, 27 Aug 2012 17:47:58 +0000"  >&lt;p&gt;Can you provide the output from your validate(true) as well as the sample code which inserted this bad data?&lt;/p&gt;</comment>
                            <comment id="157029" author="pghosh" created="Mon, 27 Aug 2012 17:43:21 +0000"  >&lt;p&gt;This issue is happening when we are trying to insert record from java code i.e the records are getting corrupted. And when I run the mongo db validate method on the collection in question, I receive the mentioned log. Since the record is getting corrupted(as per mongo validate) during the insert from java code I do not think this is a issue with ruby.&lt;/p&gt;

&lt;p&gt;The server version : 2.0.6&lt;br/&gt;
To insert record in mongo we are using : org.springframework.data.mongodb.core.MongoTemplate&lt;/p&gt;</comment>
                            <comment id="156977" author="scotthernandez" created="Mon, 27 Aug 2012 16:33:22 +0000"  >&lt;p&gt;This doesn&apos;t sounds like a java exception nor error message. Did you mean to put this in the server project, or maybe ruby?&lt;/p&gt;

&lt;p&gt;How did you get this data into the database? What version is the server?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </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|hrgg5b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9525</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>