Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 42091 invoked from network); 27 Apr 2010 14:00:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Apr 2010 14:00:05 -0000 Received: (qmail 77069 invoked by uid 500); 27 Apr 2010 14:00:03 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 77032 invoked by uid 500); 27 Apr 2010 14:00:03 -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 77025 invoked by uid 99); 27 Apr 2010 14:00:03 -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:00:03 +0000 X-ASF-Spam-Status: No, hits=1.7 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of serera@gmail.com designates 209.85.219.221 as permitted sender) Received: from [209.85.219.221] (HELO mail-ew0-f221.google.com) (209.85.219.221) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Apr 2010 13:59:57 +0000 Received: by ewy21 with SMTP id 21so3358069ewy.5 for ; Tue, 27 Apr 2010 06:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=m9DABxKOMVbv6t+p7Ii8/JVUxk43qdaIJJgArG2us7g=; b=M46lgcNIeAgDZvtX1Fu4eGy2OsrTcMmlGtz/tOy0ybUFMeEwlV+zTquBLFLm4K7db1 nZK38NJZfm1s1BKf3bVumlBTBe3bM0MXb90PzUf59077qCH4W1OI0Kjx7Q96Gw0QPneb gaiv3aQVebFqbe9HCoys6yuLT24obsCzeEeZg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Ge1cMxS/evNe6or2rYhS2lHvQEyf54krjamyZOK56Ui50w9Ut10kKSxND4ZFqQO0J/ UKw3vkI8fo8TjM/S5kJVpwyd8VNcJO52GO0J2t21wi4bwLolrpySwQEu5R7VvPIB50OU a+QHhvWrMdKCJo8hUda3SxZ9aifpheZ6N0Js8= MIME-Version: 1.0 Received: by 10.103.37.12 with SMTP id p12mr3224829muj.94.1272376775944; Tue, 27 Apr 2010 06:59:35 -0700 (PDT) Received: by 10.103.39.4 with HTTP; Tue, 27 Apr 2010 06:59:35 -0700 (PDT) Date: Tue, 27 Apr 2010 16:59:35 +0300 Message-ID: Subject: Enhance SnapshotDeletionPolicy to allow taking multiple snapshots From: Shai Erera To: dev@lucene.apache.org Content-Type: multipart/alternative; boundary=0016e659f444c02a550485384ddd --0016e659f444c02a550485384ddd Content-Type: text/plain; charset=ISO-8859-1 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 --0016e659f444c02a550485384ddd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi

Today, SnapshotDeletionPolicy (SDP) allows takin= g only one snapshot. I need to be able to take multiple snapshots. Consider= multiple processes doing several things on the index - each needs a snapsh= ot of the index so that commit it needs doesn't get deleted under the c= overs. SDP is perfect, only it allows for only one snapshot. So I was think= ing to extend it to a MultiSDP which adds an 'id' parameter to snap= shot() and release(). But then, I was thinking - why shouldn't that exi= st in SDP? It won't make the API anymore complicated, and in addition w= on't introduce yet another DP class.

This can be done in two ways:
1) snapshot() and release() get the ex= tra parameter. For convenience we can allow for a null id, in which case on= ly one snapshot w/ a null id can be taken (until it's released). To avo= id 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 functional= ity in SDP, but if you prefer an extension to it, then we'll need to al= low for easier extension of SDP (I think we should do that anyway).

What do you think?

Shai
--0016e659f444c02a550485384ddd--