You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by jc...@apache.org on 2009/05/05 00:23:40 UTC

svn commit: r771472 - /couchdb/trunk/src/couchdb/couch_db.erl

Author: jchris
Date: Mon May  4 22:23:39 2009
New Revision: 771472

URL: http://svn.apache.org/viewvc?rev=771472&view=rev
Log:
hinting to reduce sparseness in chunked attachment puts

Modified:
    couchdb/trunk/src/couchdb/couch_db.erl

Modified: couchdb/trunk/src/couchdb/couch_db.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_db.erl?rev=771472&r1=771471&r2=771472&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_db.erl (original)
+++ couchdb/trunk/src/couchdb/couch_db.erl Mon May  4 22:23:39 2009
@@ -624,10 +624,12 @@
             {ok, {FinalLen, SpFin}};
         ({Length, Bin}, {Total, nil}) ->
             % save StreamPointer 
+            ok = couch_stream:set_min_buffer(Stream, Length),
             {ok, StreamPointer} = couch_stream:write(Stream, Bin),
             {Total+Length, StreamPointer};
         ({Length, Bin}, {Total, SpAcc}) ->
             % write the Bin to disk 
+            ok = couch_stream:set_min_buffer(Stream, Length),
             {ok, _Sp} = couch_stream:write(Stream, Bin),
             {Total+Length, SpAcc}
     end.