<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:58:33 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>[CXX-218] GridFS and GridFile incremental writing</title>
                <link>https://jira.mongodb.org/browse/CXX-218</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;Pulling into legacy-0.10.0 so that we get this committed sometime this iteration. We agree on the utility of the feature, and the code as is has gone through and passed code review, but there is one lingering issue over the lifecycle of the chunk inserter to be resolved that may require some refactoring.&lt;/p&gt;</description>
                <environment></environment>
        <key id="134818">CXX-218</key>
            <summary>GridFS and GridFile incremental writing</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="pakozm">Francisco Zamora-Martinez</reporter>
                        <labels>
                            <label>legacy-cxx</label>
                    </labels>
                <created>Sun, 4 May 2014 21:58:14 +0000</created>
                <updated>Fri, 13 Jun 2014 21:28:59 +0000</updated>
                            <resolved>Wed, 11 Jun 2014 18:26:46 +0000</resolved>
                                    <version>legacy-0.8.0</version>
                                    <fixVersion>legacy-0.10.0</fixVersion>
                                    <component>Implementation</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="574397" author="acm" created="Tue, 6 May 2014 16:18:58 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/70&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/70&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="572450" author="pakozm" created="Sun, 4 May 2014 22:03:54 +0000"  >&lt;p&gt;It will be nice to had the posibility of writing new GridFS files as a stream. &lt;br/&gt;
I have an implementation ready in my fork, using a new class GridFileBuilder which allow to perform several data appends which are enqueued in an auxiliary buffer until a chunk of data is full an ready to be send to MongoDB. I will like to make pull request. Sugestions and comments are wellcome. My commit is here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/pakozm/mongo-cxx-driver/commit/29c563efe5cbf2441061cc23e0be4a972e3d5455&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/pakozm/mongo-cxx-driver/commit/29c563efe5cbf2441061cc23e0be4a972e3d5455&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The basic API of the new class will be:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;GridFileBuilder(GridFS *grid) =&amp;gt; the constructor takes the GridFS pointer and annotates the chunkSize which couldn&apos;t be changed. The GridFileBuilder will need to access GridFS pointer as a friend, because it needs to access to chunkNS and _client properties.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;void appendChunk(const char *data, size_t length) =&amp;gt; appends the given string of data, which would splitted in several chunks or annotated in the auxiliary buffer. Auxiliary buffer data will be stored at GridFS when it arrives to chunkSize length.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;BSONObj buildFile(string name, string contentType) =&amp;gt; inserts the new file in GridFS using the method insertFile. If the auxiliary buffer contains data, it will be stored before to call insertFile.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I simple use case is when you need to write a large amount of generated data (not stored in your filesystem disk), and you don&apos;t want to store it in temporary disk files.&lt;/p&gt;</comment>
                    </comments>
                    <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|hrykp3:</customfieldvalue>

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