Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 62848 invoked from network); 9 Mar 2011 15:04:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Mar 2011 15:04:01 -0000 Received: (qmail 12328 invoked by uid 500); 9 Mar 2011 15:04:01 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 12147 invoked by uid 500); 9 Mar 2011 15:04:00 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 12139 invoked by uid 99); 9 Mar 2011 15:04:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2011 15:04:00 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of adam.kocoloski@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2011 15:03:52 +0000 Received: by vws20 with SMTP id 20so656706vws.11 for ; Wed, 09 Mar 2011 07:03:31 -0800 (PST) Received: by 10.52.72.44 with SMTP id a12mr5188132vdv.313.1299683011292; Wed, 09 Mar 2011 07:03:31 -0800 (PST) Received: from [10.1.10.164] (c-24-60-185-198.hsd1.ma.comcast.net [24.60.185.198]) by mx.google.com with ESMTPS id i1sm1419938vby.11.2011.03.09.07.03.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Mar 2011 07:03:30 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1082) Subject: Re: Tree::term() is really a tree() From: Adam Kocoloski In-Reply-To: Date: Wed, 9 Mar 2011 10:03:28 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1082) X-Virus-Checked: Checked by ClamAV on apache.org 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): >=20 > % Tree::term() is really a tree(), but we don't want to require R13B04 = yet > -type branch() :: {Key::term(), Value::term(), Tree::term()}. >=20 > 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 ? >=20 >=20 > - > 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=