<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:16:38 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-8133] mongoimport TSV,CSV and JSON always generate duplicate entries for all but the first record when importing</title>
                <link>https://jira.mongodb.org/browse/SERVER-8133</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When importing a simple file with 5 unique rows in it into a new container using mongoimport (I will give examples below into a new container).  The import tool says all went well, but only the first row is is saved.  I was able to produce this behavior for TSV, CSV and JSON files.&lt;/p&gt;

&lt;p&gt;Staring up the mongodb amazon instance from the amazon market place and upgrading to mongodb 2.2.2 via yum would be the surest way to duplicate what I was seeing.  To be specific I was using the public Amazon Instance ID: ami-62da7c0b as a starting point.&lt;/p&gt;
</description>
                <environment>verified on OSX 10.8.2, Centos 5.5 and Amazon Image from 10-Gen upgraded mongodb 2.2.2</environment>
        <key id="61541">SERVER-8133</key>
            <summary>mongoimport TSV,CSV and JSON always generate duplicate entries for all but the first record when importing</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="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jeffwrule">Jeff Rule</reporter>
                        <labels>
                            <label>commands</label>
                            <label>insert</label>
                    </labels>
                <created>Thu, 10 Jan 2013 09:37:14 +0000</created>
                <updated>Fri, 15 Feb 2013 15:06:00 +0000</updated>
                            <resolved>Thu, 10 Jan 2013 15:37:44 +0000</resolved>
                                    <version>2.2.2</version>
                                                    <component>Tools</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="236190" author="eliot" created="Thu, 10 Jan 2013 15:37:37 +0000"  >&lt;p&gt;the &quot;local&quot; database is special and is not intended for normal user use.&lt;br/&gt;
this will work against any other database&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="23036" name="huh.csv" size="13" author="jeffwrule" created="Thu, 10 Jan 2013 09:37:14 +0000"/>
                            <attachment id="23035" name="huh.json" size="48" author="jeffwrule" created="Thu, 10 Jan 2013 09:37:14 +0000"/>
                            <attachment id="23034" name="huh.tsv" size="13" author="jeffwrule" created="Thu, 10 Jan 2013 09:37:14 +0000"/>
                            <attachment id="23033" name="mongo-error.log" size="2977" author="jeffwrule" created="Thu, 10 Jan 2013 09:37:14 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 10 Jan 2013 15:37:37 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 5 weeks, 6 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>eliot</customfieldvalue>
            <customfieldvalue>jeffwrule</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnc8n:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>38981</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) create a file huh.tsv  (see attachment)&lt;/p&gt;

&lt;p&gt;2) execute the following load...&lt;/p&gt;

&lt;p&gt;    $ mongoimport  -d local --type tsv --headerline \&lt;br/&gt;
        --stopOnError  --drop -c huh -file ./huh.tsv -v&lt;br/&gt;
    Thu Jan 10 01:16:25 creating new connection to:127.0.0.1:27017&lt;br/&gt;
    Thu Jan 10 01:16:25 BackgroundJob starting: ConnectBG&lt;br/&gt;
    Thu Jan 10 01:16:25 connected connection!&lt;br/&gt;
    connected to: 127.0.0.1&lt;br/&gt;
    Thu Jan 10 01:16:25 ns: local.huh&lt;br/&gt;
    Thu Jan 10 01:16:25 dropping: local.huh&lt;br/&gt;
    Thu Jan 10 01:16:25 filesize: 13&lt;br/&gt;
    Thu Jan 10 01:16:25 got line:myId&lt;br/&gt;
    Thu Jan 10 01:16:25 got line:1&lt;br/&gt;
    Thu Jan 10 01:16:25 got line:2&lt;br/&gt;
    Thu Jan 10 01:16:25 got line:3&lt;br/&gt;
    Thu Jan 10 01:16:25 got line:4&lt;br/&gt;
    Thu Jan 10 01:16:25 imported 4 objects&lt;/p&gt;


&lt;p&gt;3) mongo local should return 5 rows but we only get the following..&lt;/p&gt;

&lt;p&gt;    $ mongo local&lt;br/&gt;
    MongoDB shell version: 2.2.2&lt;br/&gt;
    connecting to: local&lt;br/&gt;
    &amp;gt; db.huh.find()&lt;/p&gt;
    { &quot;myId&quot; : 1 }
&lt;p&gt;    &amp;gt; &lt;/p&gt;

&lt;p&gt;I have attached the log file with verbose logging turned on below.  We only get the dups messages with verbose turned on.  I suspect you might also see this if you tried to use the  --dbpath to directly access the files.  I have seen other bugs mention that using the tool that way produces more output then in client/server mode.&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|ht06vz:</customfieldvalue>

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