couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r771472 - /couchdb/trunk/src/couchdb/couch_db.erl
Date Mon, 04 May 2009 22:23:40 GMT
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.



Mime
View raw message