Return-Path: X-Original-To: apmail-lucene-commits-archive@www.apache.org Delivered-To: apmail-lucene-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99D39180A3 for ; Fri, 18 Dec 2015 12:47:01 +0000 (UTC) Received: (qmail 95612 invoked by uid 500); 18 Dec 2015 12:47:01 -0000 Mailing-List: contact commits-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 commits@lucene.apache.org Received: (qmail 95603 invoked by uid 99); 18 Dec 2015 12:47:01 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2015 12:47:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D2124C8F4E for ; Fri, 18 Dec 2015 12:47:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.79 X-Spam-Level: * X-Spam-Status: No, score=1.79 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ri22YZuzftdI for ; Fri, 18 Dec 2015 12:47:00 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id 065A7429C2 for ; Fri, 18 Dec 2015 12:47:00 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 87E88E0501 for ; Fri, 18 Dec 2015 12:46:59 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 87D5E3A022E for ; Fri, 18 Dec 2015 12:46:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1720775 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/CHANGES.txt solr/core/ solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java Date: Fri, 18 Dec 2015 12:46:59 -0000 To: commits@lucene.apache.org From: markrmiller@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151218124659.87D5E3A022E@svn01-us-west.apache.org> Author: markrmiller Date: Fri Dec 18 12:46:59 2015 New Revision: 1720775 URL: http://svn.apache.org/viewvc?rev=1720775&view=rev Log: SOLR-8015: HdfsLock may fail to close a FileSystem instance if it cannot immediately obtain an index lock. Modified: lucene/dev/branches/branch_5x/ (props changed) lucene/dev/branches/branch_5x/solr/ (props changed) lucene/dev/branches/branch_5x/solr/CHANGES.txt (contents, props changed) lucene/dev/branches/branch_5x/solr/core/ (props changed) lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1720775&r1=1720774&r2=1720775&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original) +++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Fri Dec 18 12:46:59 2015 @@ -68,6 +68,8 @@ Bug Fixes * SOLR-8419: TermVectorComponent for distributed search when distrib.singlePass could include term vectors for documents that matched the query yet weren't in the returned documents. (David Smiley) +* SOLR-8015: HdfsLock may fail to close a FileSystem instance if it cannot immediately + obtain an index lock. (Mark Miller) Other Changes ---------------------- Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java?rev=1720775&r1=1720774&r2=1720775&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java (original) +++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java Fri Dec 18 12:46:59 2015 @@ -89,17 +89,17 @@ public class HdfsLockFactory extends Loc } } - return new HdfsLock(fs, lockFile); + return new HdfsLock(conf, lockFile); } private static final class HdfsLock extends Lock { - - private final FileSystem fs; + + private final Configuration conf; private final Path lockFile; private volatile boolean closed; - HdfsLock(FileSystem fs, Path lockFile) { - this.fs = fs; + HdfsLock(Configuration conf, Path lockFile) { + this.conf = conf; this.lockFile = lockFile; } @@ -108,6 +108,7 @@ public class HdfsLockFactory extends Loc if (closed) { return; } + final FileSystem fs = FileSystem.get(lockFile.toUri(), conf); try { if (fs.exists(lockFile) && !fs.delete(lockFile, false)) { throw new LockReleaseFailedException("failed to delete: " + lockFile);