On Mar 9, 2011, at 9:43 AM, Andrey Somov wrote:

> Hi all,
> I have found the following comment in the source (couch_db.hrl):
> 
> % Tree::term() is really a tree(), but we don't want to require R13B04 yet
> -type branch() :: {Key::term(), Value::term(), Tree::term()}.
> 
> Does it mean that CouchDB includes its own copy of gb_trees.erl ?
> Does it mean that CouchDB implements its own tree but the interface is
> identical to gb_trees.erl and it will be changed once R13B04 is required ?
> 
> 
> -
> Andrey

Hi Andrey, neither.  It simply means that the third element of a branch() is of 
type tree().  The reason for comment is that recursive type specifications are 
not supported in Erlang/OTP releases prior to R13B04, so I fell back to calling 
it a term() instead.

The tree() data structure being described is a custom data structure 
implemented entirely in couch_key_tree.erl.  It's used to store document 
revision histories.  Best,

Adam

Reply via email to