diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2011-10-26 14:04:54 -0400 |
---|---|---|
committer | Robert Newson <robert.newson@cloudant.com> | 2011-10-31 17:19:27 +0000 |
commit | 7c94ebbf91f2c61b109af53cdbae530e79424849 (patch) | |
tree | 5f9c955ff5b4edddf29c6dca3299c821db4d8fc1 /apps/couch/src/couch_view_compactor.erl | |
parent | 9f734e042519b9e85260e40330fdcab20412427c (diff) |
Fix retrieval of headers larger than 4k
Our headers start with a <<1>> and then four bytes indicating the length
of the header and its checksum. When the header is larger than 4090
bytes it will be split across multiple blocks in the file and will need
to be reassembled on read. The reassembly consists of stripping out
<<0>> from the beginning of each subsequent block in the
remove_block_prefixes/2 function. The bug here is that we tell
remove_block_prefixes that we're starting 1 byte into the current block
instead of 5, so it ends up removing one good byte from the header and
injecting one or more random <<0>>s.
Headers larger than 4k are very rare and generally require a view group
with a huge number of indexes or indexes with fairly large reductions,
which explains why this bug has gone undetected until now.
Closes COUCHDB-1319.
Diffstat (limited to 'apps/couch/src/couch_view_compactor.erl')
0 files changed, 0 insertions, 0 deletions