Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 34600 invoked from network); 21 Aug 2010 19:21:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Aug 2010 19:21:38 -0000 Received: (qmail 23621 invoked by uid 500); 21 Aug 2010 19:21:37 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 23486 invoked by uid 500); 21 Aug 2010 19:21:36 -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 23478 invoked by uid 99); 21 Aug 2010 19:21:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Aug 2010 19:21:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Aug 2010 19:21:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7LJLFe5010856 for ; Sat, 21 Aug 2010 19:21:16 GMT Message-ID: <31629570.490451282418475744.JavaMail.jira@thor> Date: Sat, 21 Aug 2010 15:21:15 -0400 (EDT) From: "Shai Erera (JIRA)" To: dev@lucene.apache.org Subject: [jira] Resolved: (LUCENE-2592) Add static readSnapshotsInfo to PersistentSnapshotDeletionPolicy In-Reply-To: <24536576.251691281436455741.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shai Erera resolved LUCENE-2592. -------------------------------- Resolution: Fixed Committed revision 987811 (3x). Committed revision 987814 (trunk). > Add static readSnapshotsInfo to PersistentSnapshotDeletionPolicy > ---------------------------------------------------------------- > > Key: LUCENE-2592 > URL: https://issues.apache.org/jira/browse/LUCENE-2592 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Shai Erera > Assignee: Shai Erera > Priority: Minor > Fix For: 3.1, 4.0 > > Attachments: LUCENE-2592.patch > > > PSDP persists the snapshots information in a Directory. When you open PSDP, it obtains a write lock on the snapshots dir (by keeping an open IndexWriter), and updates the directory when snapshots are created/released. > This causes problem in the following scenario -- you have two processes, one updates the 'content' index and keeps PSDP open (because it also takes snapshots). Another process wants to read the existing snapshots information and open a read-only IndexReader on the 'content' index. The other process cannot read the existing snapshots information, because p1 keeps a write lock on the snapshots directory. > There are two possible solutions: > # Have PSDP open the IndexWriter over the directory for each snapshot/release. A bit expensive, and unnecessary. > # Introduce a static readSnapshotsInfo on PSDP which accepts a Directory and returns the snapshots information. IMO it's cleaner, and won't have the performance overhead of opening/closing the IW as before. > I'll post a patch (implementing the 2nd approach) shortly. I'd appreciate any comments. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org