<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:09: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>[CDRIVER-480] stream: Failure to buffer 4 bytes: Failed to buffer 4 bytes within 300000 milliseconds</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-480</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;hi,&lt;br/&gt;
when I use mongoc_collection_insert  and mongoc_client_pool_try_pop to insert one record into mongodb,  bson_error_t ::message was set to &quot;Failed to read 4 bytes from socket&quot;. Even worse, I found out that thousands of same record were inserted into mongo, only the object_id was not the same.&lt;br/&gt;
how could this happen?&lt;br/&gt;
my mongo-c-client is 1.0.2, and my mongodb is 2.6.5.&lt;br/&gt;
thanks a lot .&lt;br/&gt;
Allen&lt;/p&gt;</description>
                <environment>centos4.3</environment>
        <key id="173435">CDRIVER-480</key>
            <summary>stream: Failure to buffer 4 bytes: Failed to buffer 4 bytes within 300000 milliseconds</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="bjori">Hannes Magnusson</assignee>
                                    <reporter username="mizzler">Allen K</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Dec 2014 10:31:54 +0000</created>
                <updated>Mon, 17 Aug 2015 19:03:31 +0000</updated>
                            <resolved>Tue, 14 Jul 2015 00:14:13 +0000</resolved>
                                    <version> 1.0.2 </version>
                                    <fixVersion>1.2-beta0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="965151" author="xgen-internal-githook" created="Mon, 13 Jul 2015 23:22:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-480&quot; title=&quot;stream: Failure to buffer 4 bytes: Failed to buffer 4 bytes within 300000 milliseconds&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-480&quot;&gt;&lt;del&gt;CDRIVER-480&lt;/del&gt;&lt;/a&gt;: Check for closed sockets before sending things over the wire&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/f7cb8c497604a291780d6b0692732014bda20835&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/f7cb8c497604a291780d6b0692732014bda20835&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="946064" author="jesse" created="Fri, 19 Jun 2015 21:00:59 +0000"  >&lt;p&gt;Needs forward-port to 1.2, CHECK_CLOSED_DURATION_MSEC isn&apos;t checked in the 1.2.0-dev branch.&lt;/p&gt;</comment>
                            <comment id="837297" author="jason.carey" created="Wed, 25 Feb 2015 20:05:17 +0000"  >&lt;p&gt;Allen,&lt;/p&gt;

&lt;p&gt;I&apos;m going to close this as fixed (I was able to reproduce a problem somewhat similar to yours that I did fix in 1.1.0).&lt;/p&gt;

&lt;p&gt;If you&apos;re still having trouble, please re-open or file a new issue.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Jason&lt;/p&gt;</comment>
                            <comment id="791011" author="jason.carey" created="Fri, 19 Dec 2014 17:53:32 +0000"  >&lt;p&gt;Allen,&lt;/p&gt;

&lt;p&gt;I&apos;ve taken some steps to improve handling of long running sockets in libmongoc (specifically, checking if the socket is half closed before attempting writes).  The change was introduced in &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/08cbe7621a64847792da091693268846aaf283f5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/08cbe7621a64847792da091693268846aaf283f5&lt;/a&gt;.  There is still always the chance for a race (where we write a command onto the wire and then the server hangs up before giving us the result), but that change should remove the majority of spurious errors of that kind.&lt;/p&gt;

&lt;p&gt;I&apos;ll be releasing a 1.1.0-rc1 in a few days that will include that change, if you could test against that and let me know if it fixes your problem I&apos;d greatly appreciate it.  Or feel free to test against current master, that also includes that change.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Jason&lt;/p&gt;</comment>
                            <comment id="782966" author="mizzler" created="Wed, 10 Dec 2014 18:43:07 +0000"  >&lt;p&gt;hi,&lt;br/&gt;
I am sorry that I made a mistake. Duplicated insertion due to my environment problem. My program got data from a redis cluster with two instance, which is slave of each other. &lt;br/&gt;
But there is still problem. The mongoc api report insertion failure but in fact, data has been inserted into mongodb. The network between my mongo client and mongodb is in good condition, and I use connection pool. I still wonder how to solve this warning.&lt;br/&gt;
thanks again.&lt;br/&gt;
Allen &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="205312">CDRIVER-682</issuekey>
        </issuelink>
                            </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|hreiov:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1125</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="374">Platform 00 2/20/15</customfieldvalue>
    <customfieldvalue id="610">C Driver 2015Q2 sprint 4</customfieldvalue>

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