couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r955000 - /couchdb/trunk/src/couchdb/couch_file.erl
Date Tue, 15 Jun 2010 18:52:11 GMT
Author: damien
Date: Tue Jun 15 18:52:11 2010
New Revision: 955000

URL: http://svn.apache.org/viewvc?rev=955000&view=rev
Log:
Fix for wrong offset when writing headers and converting them to blocks, only triggered when
header is larger than 4k. COUCHDB-800.

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

Modified: couchdb/trunk/src/couchdb/couch_file.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_file.erl?rev=955000&r1=954999&r2=955000&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_file.erl (original)
+++ couchdb/trunk/src/couchdb/couch_file.erl Tue Jun 15 18:52:11 2010
@@ -302,7 +302,7 @@ handle_call({write_header, Bin}, _From, 
     BlockOffset ->
         Padding = <<0:(8*(?SIZE_BLOCK-BlockOffset))>>
     end,
-    FinalBin = [Padding, <<1, BinSize:32/integer>> | make_blocks(1, [Bin])],
+    FinalBin = [Padding, <<1, BinSize:32/integer>> | make_blocks(5, [Bin])],
     case file:write(Fd, FinalBin) of
     ok ->
         {reply, ok, File#file{eof=Pos+iolist_size(FinalBin)}};



Mime
View raw message