Author: jchris
Date: Mon May 4 22:26:23 2009
New Revision: 771476
URL: http://svn.apache.org/viewvc?rev=771476&view=rev
Log:
backport attachment sparseness fix (r771472) into 0.9.x branch
Modified:
couchdb/branches/0.9.x/ (props changed)
couchdb/branches/0.9.x/etc/default/couchdb (props changed)
couchdb/branches/0.9.x/src/couchdb/couch_db.erl
Propchange: couchdb/branches/0.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 4 22:26:23 2009
@@ -1,3 +1,3 @@
/couchdb/branches/design_resources:751716-751803
/couchdb/branches/form:729440-730015
-/couchdb/trunk:758717,760442,760503,760532,760535,760537-760539,761343,761347-761348,761352-761353,761355,762016,765420,765479,766347,766353,766358,766373,766505,767543,768573,769109
+/couchdb/trunk:758717,760442,760503,760532,760535,760537-760539,761343,761347-761348,761352-761353,761355,762016,765420,765479,766347,766353,766358,766373,766505,767543,768573,769109,771472
Propchange: couchdb/branches/0.9.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 4 22:26:23 2009
@@ -1,4 +1,4 @@
/couchdb/branches/design_resources/etc/default/couchdb:751716-751803
/couchdb/branches/form/etc/default/couchdb:729440-730015
-/couchdb/trunk/etc/default/couchdb:758717,760442,760503,760532,760535,760537-760539,761343,761347-761348,761352-761353,761355,762016,765420,765479,766347,766353,766358,766373,766505,767543,768573,769109
+/couchdb/trunk/etc/default/couchdb:758717,760442,760503,760532,760535,760537-760539,761343,761347-761348,761352-761353,761355,762016,765420,765479,766347,766353,766358,766373,766505,767543,768573,769109,771472
/incubator/couchdb/trunk/etc/default/couchdb:642419-694440
Modified: couchdb/branches/0.9.x/src/couchdb/couch_db.erl
URL:
http://svn.apache.org/viewvc/couchdb/branches/0.9.x/src/couchdb/couch_db.erl?rev=771476&r1=771475&r2=771476&view=diff
==============================================================================
--- couchdb/branches/0.9.x/src/couchdb/couch_db.erl (original)
+++ couchdb/branches/0.9.x/src/couchdb/couch_db.erl Mon May 4 22:26:23 2009
@@ -635,10 +635,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.