couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Kocoloski (JIRA)" <>
Subject [jira] Commented: (COUCHDB-913) Caching of BTree nodes and documents
Date Fri, 22 Oct 2010 03:06:15 GMT


Adam Kocoloski commented on COUCHDB-913:

Hi Filipe, I read through the term_cache_trees code and the patches to couch.  I have a couple
of comments:

1) The free_cache_entry code could save one get call by using take_smallest/1 and take_largest/1
instead of smallest/1 and largest/1 on the access time tree, right?

2) Similarly, I think you could skip the gb_trees:delete(Key, Items) call in the put handler
and use gb_trees:enter instead of insert at the end of the handler.

3) Unless I'm missing something I believe you're leaking a cache process during DB and view
group compaction.  A new_btree_cache() is created during couch_db_updater:init_db() and couch_view_group:reset_group(),
but the old cache is not destroyed when either compaction finishes.

Cheers, Adam

> Caching of BTree nodes and documents
> ------------------------------------
>                 Key: COUCHDB-913
>                 URL:
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
> The following patch adds optional caching of BTree nodes (for both DBs and view indexes)
and documents:
> Look at the new parameters introduced in for more details.
> This is based on the work initially done by Randall Leeds, found at:
> I'll not commit it before 1.1 nor without any feedback.
> cheers

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message