incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Joseph Davis (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-1084) Remove unnecessary btree lookup inside couch_db_updater
Date Tue, 08 Mar 2011 03:57:03 GMT

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

Paul Joseph Davis commented on COUCHDB-1084:
--------------------------------------------

First, a tsk tsk. There's a noticeable amount of changes that aren't actually related to the
patch that make it difficult to review. I don't want to hamper my image as a crotchety oldtimer
so I can't not point that out.

The general idea seems to be pretty good. Passing a function down to the btree modification
seems like it could have a notable impact on updates to avoid the double traversal in cases
where its a row oriented update. Though the specific implementation of passing a bunch of
{Key, ModifyFun} pairs makes me a bit squeamish. I'd like to see an investigation of passing
a ModifyFun that has a signature of something like fun(Key, OldVal, NewVal, Acc) and returns
the value to be inserted. Also, if I read the patch correctly, it effectively prevents the
atom nil from being used as a key which seems odd.

Either way, I'm definitely +1 on exploring the idea here. It'd be good to start doing some
initial performance testing to see what we might expect for improvements.


> Remove unnecessary btree lookup inside couch_db_updater
> -------------------------------------------------------
>
>                 Key: COUCHDB-1084
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1084
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.2
>            Reporter: Damien Katz
>            Assignee: Damien Katz
>         Attachments: remove_btree_lookup.patch
>
>
> The CouchDB update process has an unnecessary btree lookup, where it reads the values
in bulks, checks for conflicts, writes the docs to disk, updates the values appropriately
and writes them to the btree out in a second step. It's possible to avoid this second step,
and instead do all the checking, doc writing and value transformation in a single btree lookup,
thereby reducing the number of btree traversals and disk IO.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message