Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-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 61642993D for ; Mon, 6 Feb 2012 13:28:08 +0000 (UTC) Received: (qmail 24783 invoked by uid 500); 6 Feb 2012 13:28:08 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 24535 invoked by uid 500); 6 Feb 2012 13:28:07 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 24527 invoked by uid 99); 6 Feb 2012 13:28:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 13:28:07 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jukka.zitting@gmail.com designates 74.125.82.50 as permitted sender) Received: from [74.125.82.50] (HELO mail-ww0-f50.google.com) (74.125.82.50) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 13:28:01 +0000 Received: by wgbdq11 with SMTP id dq11so6390909wgb.19 for ; Mon, 06 Feb 2012 05:27:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=x6aWKw5Z+/9DBYJgAHkxxeaDyIru/gpoeZU+v0DrgxE=; b=ZA35w/dkDqfjH418xgdjacA+xmYRdU4E+oWuEsbAB2j7YuC9Z95LDFxW6z3YlrgfKb 8m0qe0RSRUCRrq3XHe0ROf9dEXzHwxVUvxPdiwfAOd4ePMJvXWaHmP5ulBh9GP4syvL/ 7NtQCJtbOWCSkvrjV+JRr1RnttO3OU5FMtB4M= Received: by 10.180.97.166 with SMTP id eb6mr27719595wib.5.1328534859230; Mon, 06 Feb 2012 05:27:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.106.71 with HTTP; Mon, 6 Feb 2012 05:27:19 -0800 (PST) In-Reply-To: <4F2FCD4B.6090002@apache.org> References: <4F2C2B0E.7050508@apache.org> <4F2FCD4B.6090002@apache.org> From: Jukka Zitting Date: Mon, 6 Feb 2012 14:27:19 +0100 Message-ID: Subject: Re: [jr3 microkernel] Change log consolidation To: dev@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, On Mon, Feb 6, 2012 at 1:53 PM, Michael D=FCrig wrote: >> An alternative that AFAICT achieves the same effect in perhaps an >> easier to understand manner would be to use the state of the content >> tree instead of changes to that state as the key concept. [...] > > That's more or less what I started with [1] and what I referred to as can= of > worms in my original mail. Detecting and normalizing/consolidating moves > turned out to be too tricky there. You basically have the same cases I > identified (1. - 16.) but its much more difficult to tell them apart. Instead of separate Added/Existing/Moved/Removed instances in the ChangeTree, did you consider keeping the modified content just as (say) TransientNode instances, without trying to keep track of how they came to exist? Then, when you actually need the change log, you should still be able to construct it by diffing the transient tree against the persistent base state of the content tree. The only caveat I know of is that moves can only be reliably detected for referenceable nodes or ones with an equivalent internal unique ID (which we shouldn't have trouble doing if needed). BR, Jukka Zitting