Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 67569 invoked from network); 27 Apr 2010 14:55:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Apr 2010 14:55:27 -0000 Received: (qmail 2004 invoked by uid 500); 27 Apr 2010 14:55:26 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 1949 invoked by uid 500); 27 Apr 2010 14:55:26 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 1942 invoked by uid 99); 27 Apr 2010 14:55:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Apr 2010 14:55:26 +0000 X-ASF-Spam-Status: No, hits=-0.6 required=10.0 tests=AWL,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.222.180] (HELO mail-pz0-f180.google.com) (209.85.222.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Apr 2010 14:55:19 +0000 Received: by pzk10 with SMTP id 10so5917354pzk.20 for ; Tue, 27 Apr 2010 07:54:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.247.20 with SMTP id u20mr3175243rvh.122.1272380098420; Tue, 27 Apr 2010 07:54:58 -0700 (PDT) Received: by 10.150.190.12 with HTTP; Tue, 27 Apr 2010 07:54:58 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Apr 2010 10:54:58 -0400 Message-ID: Subject: Re: Enhance SnapshotDeletionPolicy to allow taking multiple snapshots From: Michael McCandless To: dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 This would be great! I think we should just enhance SDP rather than make a new MDP. Mike On Tue, Apr 27, 2010 at 9:59 AM, Shai Erera wrote: > Hi > > Today, SnapshotDeletionPolicy (SDP) allows taking only one snapshot. I need > to be able to take multiple snapshots. Consider multiple processes doing > several things on the index - each needs a snapshot of the index so that > commit it needs doesn't get deleted under the covers. SDP is perfect, only > it allows for only one snapshot. So I was thinking to extend it to a > MultiSDP which adds an 'id' parameter to snapshot() and release(). But then, > I was thinking - why shouldn't that exist in SDP? It won't make the API > anymore complicated, and in addition won't introduce yet another DP class. > > This can be done in two ways: > 1) snapshot() and release() get the extra parameter. For convenience we can > allow for a null id, in which case only one snapshot w/ a null id can be > taken (until it's released). To avoid making up an id if you really need a > single snapshot. > 2) add variants snapshot() and release() which take an id as argument. Or > ... extend SDP to MultiSDP. > > I'd prefer if we keep that functionality in SDP, but if you prefer an > extension to it, then we'll need to allow for easier extension of SDP (I > think we should do that anyway). > > What do you think? > > Shai > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org