couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Kocoloski (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COUCHDB-1319) Headers larger than 4k cannot be retrieved
Date Wed, 26 Oct 2011 18:03:32 GMT
Headers larger than 4k cannot be retrieved
------------------------------------------

                 Key: COUCHDB-1319
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1319
             Project: CouchDB
          Issue Type: Bug
    Affects Versions: 1.1
            Reporter: Adam Kocoloski
            Assignee: Adam Kocoloski
             Fix For: 1.2


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 or more good bytes 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.

Patch forthcoming.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message