Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 86458 invoked from network); 10 Oct 2007 17:03:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Oct 2007 17:03:10 -0000 Received: (qmail 14987 invoked by uid 500); 10 Oct 2007 16:18:58 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 14947 invoked by uid 500); 10 Oct 2007 16:18:58 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 14935 invoked by uid 99); 10 Oct 2007 16:18:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2007 09:18:58 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 66.249.82.237 as permitted sender) Received: from [66.249.82.237] (HELO wx-out-0506.google.com) (66.249.82.237) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2007 16:19:01 +0000 Received: by wx-out-0506.google.com with SMTP id s8so238065wxc for ; Wed, 10 Oct 2007 09:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=LcLMdxNsTrjZUFbPOzk8XbszjqEMWylhTp368v+LhC4=; b=EMxB0lYcdK+5Itw2cXb7lU0ma+oVN5qgOUKS8No3UUHOO0WelOeODOkzhBcrQ71n+7weSKaNX/IZDvUSwGhUfWg2ZijOz5VUYcbQxQmBpNH+K82ezVT+gFYGX8+oA+JWao35Gb+G8Bjp5/v5yeX0gDNoL3fI+E5QLrzqvt69UoQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dyBZz7AtWayNKQWuGyV7GlmDQjG4AH2F5ATcSu23/rs+mZBJH7V/06WJn/UCzia2UjIAWmr8azD2XYyXGZwi+Cys1XfTOFIcuPYQEhVyl8S5CM/d8wnhET8ZyFTd0puggWcVlvOSqj4mMh9H64eZYqyL/jSixwWOA+c5PU8L9YU= Received: by 10.90.101.19 with SMTP id y19mr1426014agb.1192033119734; Wed, 10 Oct 2007 09:18:39 -0700 (PDT) Received: by 10.90.31.5 with HTTP; Wed, 10 Oct 2007 09:18:39 -0700 (PDT) Message-ID: Date: Wed, 10 Oct 2007 18:18:39 +0200 From: "Emmanuel Lecharny" Reply-To: elecharny@iktek.com To: "Apache Directory Developers List" Subject: Re: [ChangeLog] Some Q about initialization In-Reply-To: <2C0FB1B7-CD5E-4409-91FE-704F0EB30168@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2C0FB1B7-CD5E-4409-91FE-704F0EB30168@yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org On 10/10/07, David Jencks wrote: > > On Oct 10, 2007, at 5:46 AM, Emmanuel Lecharny wrote: > > > Hi, > > > > I was just wondering if we should not be able to initialize the logger > > dynamically ? Using an extended operation to start or stop the logger > > seems appropriate. > > What is the use case for turning it on and off while the server is > running? Sometime you want to debug a live server, but you don't want to stop it and restart it. Not sure that it's a good idea though... (It could have saved me hours in the past, when I had to wait until 3 am to be able to stop and restart a production server (WebSphere) just to activate some logs and to do the reverse operation the night after to desactivate the logs, and one more day to analyze 4.5 Gb of logs ;) Usually when you introduce runtime configurability like > this you need to either synchronize something on the runtime path or > introduce a volatile to assure that the component is using completely > initialized and configured objects, and this can easily add up in > speed costs. Nothing seems to be free those days ;) Yes, you are right, we will have to synchronize the flag which set the service. Does it cost a lot ? If we consider that the server is able to deliver around 5400 search req/s on a laptop, what will be the impact ? How many req/s will we lose ? > > > > > I also think that the Interceptor I'm working on is not really a log > > interceptor, as it stores anti-modification, and not the modifications > > themselves. Should we create another interceptor, or should we store > > the anti-modification somewhere else? > > > > As those anti-modification must be applied in revert order, a file is > > not really the most appropriate solution. > > > > For what we want to use it (reverting to a previous state) we can > > store the anti-modifications in a stack, in memory. > > > > Thoughts ? > > Why not store a complete representation of the change as a > modification and compute the anti-modification only if it is needed? You can't do that. For a delete operation for instance, you must fetch the deleted entry before deleting it, because you don't have a copy of it, and you will lose information. However, it would work for Add and Modify operations (with a lot of complexity for Modify) In fact, computing the anti-modification is pretty simple : - Add =3D=3D> Delete using the DN - Del =3D=3D> Fetch the old entry and Add it - Modify =3D=3D> Fetch the previous entry, Delete the modified entry and Add the fetched entry - Rename from N1 to N2 =3D=3D> Rename from N2 to N1 - Move from N1 to N2 =3D=3D> Move from N2 to N1 > Then the log can also work as a transaction journal. I have no idea > how hard figuring out a complete representation of the change is -- > your other post made it sound like it has a lot of complexity. The Add and Delete modification are pretty simple. The modify operation is damn complex. The rename/move operation potentially impact a hell lot of entries (can be the whole tree), but is simple too. > > thanks > david jencks > > > > > -- > > Regards, > > Cordialement, > > Emmanuel L=E9charny > > www.iktek.com > > --=20 Regards, Cordialement, Emmanuel L=E9charny www.iktek.com