Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C06DD992B for ; Tue, 13 Mar 2012 17:27:02 +0000 (UTC) Received: (qmail 63453 invoked by uid 500); 13 Mar 2012 17:27:02 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 63394 invoked by uid 500); 13 Mar 2012 17:27:02 -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 63385 invoked by uid 99); 13 Mar 2012 17:27:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 17:27:02 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [207.126.144.137] (HELO eu1sys200aog114.obsmtp.com) (207.126.144.137) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 17:26:54 +0000 Received: from proxy03.detica.com ([193.36.230.103]) (using TLSv1) by eu1sys200aob114.postini.com ([207.126.147.11]) with SMTP ID DSNKT1+DSD55g8D9Qv/y7IFx1ZZDC/s0NhGR@postini.com; Tue, 13 Mar 2012 17:26:34 UTC Received: from blackex04.detica.com ([10.1.1.9]) by proxy03.detica.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 13 Mar 2012 17:26:26 +0000 Received: from uksrpblkexb02.detica.com ([10.1.1.39]) by blackex04.detica.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 13 Mar 2012 17:26:32 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CD013E.6EC5452E" Subject: Fundamentals Question on CoucheDB's append only b+tree. Date: Tue, 13 Mar 2012 17:26:31 -0000 Message-ID: <5293620AC1A91649BDD85E5380BC837A79A808@uksrpblkexb02.detica.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Fundamentals Question on CoucheDB's append only b+tree. Thread-Index: Ac0BPm38UVfADao8QfSvz3JvdWcXqA== From: "Davies, Owain" To: X-OriginalArrivalTime: 13 Mar 2012 17:26:32.0079 (UTC) FILETIME=[6EB861F0:01CD013E] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01CD013E.6EC5452E Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I have been reading the couchDB guide, particularly the appendix on the power of b-trees. As I understand it couchdb uses a b+tree, in which the leaf nodes have pointers to their siblings to facilitate quick in-order and reverse in-order enumeration of the documents in the b+tree. When a document is modified (or added), then the document is appended to the file, the leaf node is cloned and updated to point to the new document. However in order to maintain the linked list between the sibling leaf nodes, you would need to update the adjacent link nodes (creating new leaf nodes appended onto the end of the file), this will eventually require that the whole tree is replicated, not just the node on the path to the effected leaf node. I do not think this can be the case, could somebody point out where I have made the mistake?=20 Thanks, Owain Please consider the environment before printing this email. = This message should be regarded as confidential. If you have received thi= s email in error please notify the sender and destroy it immediately. = Statements of intent shall only become binding when confirmed in hard cop= y by an authorised signatory. = = The contents of this email may relate to dealings with other companies un= der the control of BAE Systems plc details of which can be found at http:= //www.baesystems.com/Businesses/index.htm. = Detica Limited is a BAE Systems company trading as BAE Systems Detica. Detica Limited is registered in England and Wales under No: 1337451. Registered office: Surrey Research Park, Guildford, Surrey, GU2 7YP, Engl= and. =0D ------_=_NextPart_001_01CD013E.6EC5452E--