[ 
https://issues.apache.org/jira/browse/COUCHDB-3298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891053#comment-15891053
 ] 

ASF subversion and git services commented on COUCHDB-3298:
----------------------------------------------------------

Commit ff9fb7112ee5250af01e1b38c8cfa9caed152ae7 in couchdb-couch's branch 
refs/heads/master from [~paul.joseph.davis]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=ff9fb71 ]

Ensure multi-item chunks in couch_btree:chunkify/1

If the last element of a chunk has a huge reduction it was possible to
return a btree node that had a single key. This prevents the edge case
by forcing it into the previous chunk. Without this we can end up with a
case where a path in the tree can extend for many levels with only a
single key in each node.

COUCHDB-3298


> Improve couch_btree:chunkify logic
> ----------------------------------
>
>                 Key: COUCHDB-3298
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3298
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>            Reporter: Paul Joseph Davis
>
> The current chunkify has problems when reduce functions create large values 
> in that it will produce chunks (ie, kp nodes) that contain a single key. In 
> some pathological cases this can create long chains of nodes that never 
> branch.
> The old chunkify would also try and create nodes with an even number of bytes 
> in each chunk. Given that we don't re-use chunks it makes more sense to try 
> and pack our chunks as close to the threshold as possible so that we're 
> creating fewer branches in our tree.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to