lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r950195 - in /lucene/java/branches/lucene_3_0: ./ contrib/ contrib/analyzers/ contrib/highlighter/src/test/ contrib/instantiated/src/test/org/apache/lucene/store/instantiated/ src/java/org/apache/lucene/analysis/ src/java/org/apache/lucene/...
Date Tue, 01 Jun 2010 18:33:37 GMT
Author: mikemccand
Date: Tue Jun  1 18:33:37 2010
New Revision: 950195

URL: http://svn.apache.org/viewvc?rev=950195&view=rev
Log:
LUCENE-2104: in NativeFSLockFactory, don't silently fail to release if lock is held by another
process

Modified:
    lucene/java/branches/lucene_3_0/   (props changed)
    lucene/java/branches/lucene_3_0/CHANGES.txt   (contents, props changed)
    lucene/java/branches/lucene_3_0/build.xml   (props changed)
    lucene/java/branches/lucene_3_0/contrib/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/CHANGES.txt   (props changed)
    lucene/java/branches/lucene_3_0/contrib/analyzers/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/highlighter/src/test/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/analysis/Tokenizer.java   (props
changed)
    lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/NativeFSLockFactory.java
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestDateTools.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestNumberTools.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/   (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestLockFactory.java
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
  (props changed)

Propchange: lucene/java/branches/lucene_3_0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -3,4 +3,4 @@
 /lucene/java/branches/lucene_2_4:748824
 /lucene/java/branches/lucene_2_9:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests:818601-821336
-/lucene/java/trunk:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Modified: lucene/java/branches/lucene_3_0/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0/CHANGES.txt?rev=950195&r1=950194&r2=950195&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0/CHANGES.txt (original)
+++ lucene/java/branches/lucene_3_0/CHANGES.txt Tue Jun  1 18:33:37 2010
@@ -12,6 +12,9 @@ Bug fixes
 * LUCENE-2142: FieldCacheImpl.getStringIndex no longer throws an
   exception when term count exceeds doc count.  (Mike McCandless)
   
+* LUCENE-2104: NativeFSLock.release() would silently fail if the lock is held by 
+  another thread/process.  (Shai Erera via Uwe Schindler)
+  
 * LUCENE-2283: Use shared memory pool for term vector and stored
   fields buffers. This memory will be reclaimed if needed according to
   the configured RAM Buffer Size for the IndexWriter.  This also fixes
@@ -101,7 +104,7 @@ Bug fixes
  * LUCENE-2257: Increase max number of unique terms in one segment to
    termIndexInterval (default 128) * ~2.1 billion = ~274 billion.
    (Tom Burton-West via Mike McCandless)
-  
+
  * LUCENE-2260: Fixed AttributeSource to not hold a strong
    reference to the Attribute/AttributeImpl classes which prevents
    unloading of custom attributes loaded by other classloaders

Propchange: lucene/java/branches/lucene_3_0/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -3,4 +3,4 @@
 /lucene/java/branches/lucene_2_4/CHANGES.txt:748824
 /lucene/java/branches/lucene_2_9/CHANGES.txt:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/CHANGES.txt:818601-821336
-/lucene/java/trunk/CHANGES.txt:881213,881315,881466,882374,882464,882672,882807,882888,882977,883074-883075,883554,883654,883661,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/CHANGES.txt:881213,881315,881466,882374,882464,882672,882807,882888,882977,883074-883075,883554,883654,883661,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/build.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -3,4 +3,4 @@
 /lucene/java/branches/lucene_2_4/build.xml:748824
 /lucene/java/branches/lucene_2_9/build.xml:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/build.xml:818601-821336
-/lucene/java/trunk/build.xml:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887617,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/build.xml:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887617,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -3,4 +3,4 @@
 /lucene/java/branches/lucene_2_4/contrib:748824
 /lucene/java/branches/lucene_2_9/contrib:817269-818600,825998,829134,829816,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib:818601-821336
-/lucene/java/trunk/contrib:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/contrib:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/contrib/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -3,4 +3,4 @@
 /lucene/java/branches/lucene_2_4/contrib/CHANGES.txt:748824
 /lucene/java/branches/lucene_2_9/contrib/CHANGES.txt:817269-818600,825998,826775,829134,829816,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/CHANGES.txt:818601-821336
-/lucene/java/trunk/contrib/CHANGES.txt:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/contrib/CHANGES.txt:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/contrib/analyzers/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -1,3 +1,3 @@
 /lucene/dev/branches/branch_3x/lucene/contrib/analyzers:941394,946651
 /lucene/dev/trunk/lucene/contrib/analyzers:929738,935522,939611,948429,949976,949997
-/lucene/java/trunk/contrib/analyzers:887670,889579
+/lucene/java/trunk/contrib/analyzers:887670,889579,891205

Propchange: lucene/java/branches/lucene_3_0/contrib/highlighter/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -3,4 +3,4 @@
 /lucene/java/branches/lucene_2_4/contrib/highlighter/src/test:748824
 /lucene/java/branches/lucene_2_9/contrib/highlighter/src/test:817269-818600,825998,826775,829134,829816,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/highlighter/src/test:818601-821336
-/lucene/java/trunk/contrib/highlighter/src/test:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/contrib/highlighter/src/test:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -4,4 +4,4 @@
 /lucene/java/branches/lucene_2_9/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:817269-818600,825998,829134,829816,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:818601-821336
 /lucene/java/branches/lucene_3_0/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:889463
-/lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/analysis/Tokenizer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -3,4 +3,4 @@
 /lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/analysis/Tokenizer.java:748824
 /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/Tokenizer.java:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/Tokenizer.java:818601-821336
-/lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,896661,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,896661,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -3,4 +3,4 @@
 /lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:748824
 /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:818601-821336
-/lucene/java/trunk/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:881213,881315,881466,881984,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:881213,881315,881466,881984,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Modified: lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/NativeFSLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/NativeFSLockFactory.java?rev=950195&r1=950194&r2=950195&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/NativeFSLockFactory.java
(original)
+++ lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/NativeFSLockFactory.java
Tue Jun  1 18:33:37 2010
@@ -146,7 +146,7 @@ public class NativeFSLockFactory extends
       }
     }
   }
-};
+}
 
 class NativeFSLock extends Lock {
 
@@ -300,6 +300,24 @@ class NativeFSLock extends Lock {
       }
       if (!path.delete())
         throw new LockReleaseFailedException("failed to delete " + path);
+    } else {
+      // if we don't hold the lock, and somebody still called release(), for
+      // example as a result of calling IndexWriter.unlock(), we should attempt
+      // to obtain the lock and release it. If the obtain fails, it means the
+      // lock cannot be released, and we should throw a proper exception rather
+      // than silently failing/not doing anything.
+      boolean obtained = false;
+      try {
+        if (!(obtained = obtain())) {
+          throw new LockReleaseFailedException(
+              "Cannot forcefully unlock a NativeFSLock which is held by another indexer component:
"
+                  + path);
+        }
+      } finally {
+        if (obtained) {
+          release();
+        }
+      }
     }
   }
 

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -2,4 +2,4 @@
 /lucene/dev/trunk/lucene/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:929738,932398,935522,938989,939611,939649,945420,946599,948082,948429,949976,949997
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:825998,829134,829881,831036,896850,909334,940987,948516
-/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestDateTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -2,4 +2,4 @@
 /lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestDateTools.java:929738,932398,935522,938989,939611,939649,945420,946599,948082,948429,949976,949997
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestDateTools.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestDateTools.java:825998,829134,829881,831036,896850,909334,940987,948516
-/lucene/java/trunk/src/test/org/apache/lucene/document/TestDateTools.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/src/test/org/apache/lucene/document/TestDateTools.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestNumberTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -2,4 +2,4 @@
 /lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestNumberTools.java:929738,932398,935522,938989,939611,939649,945420,946599,948082,948429,949976,949997
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestNumberTools.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestNumberTools.java:825998,829134,829881,831036,896850,909334,940987,948516
-/lucene/java/trunk/src/test/org/apache/lucene/document/TestNumberTools.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/src/test/org/apache/lucene/document/TestNumberTools.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -1,3 +1,3 @@
 /lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index:941394,946651
 /lucene/dev/trunk/lucene/src/test/org/apache/lucene/index:929738,935522,948429,949976,949997
-/lucene/java/trunk/src/test/org/apache/lucene/index:887670,889579
+/lucene/java/trunk/src/test/org/apache/lucene/index:887670,889579,891205

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -2,4 +2,4 @@
 /lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:929738,932398,935522,938989,939611,939649,945420,946599,948082,948429,949976,949997
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:825998,829134,829881,831036,896850,909334,940987,948516
-/lucene/java/trunk/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060

Modified: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestLockFactory.java?rev=950195&r1=950194&r2=950195&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestLockFactory.java
(original)
+++ lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestLockFactory.java
Tue Jun  1 18:33:37 2010
@@ -200,6 +200,26 @@ public class TestLockFactory extends Luc
       assertFalse(l2.isLocked());
     }
 
+    public void testNativeFSLockReleaseByOtherLock() throws IOException {
+
+      NativeFSLockFactory f = new NativeFSLockFactory(System.getProperty("tempDir"));
+
+      f.setLockPrefix("test");
+      Lock l = f.makeLock("commit");
+      Lock l2 = f.makeLock("commit");
+
+      assertTrue("failed to obtain lock", l.obtain());
+      try {
+        assertTrue(l2.isLocked());
+        l2.release();
+        fail("should not have reached here. LockReleaseFailedException should have been thrown");
+      } catch (IOException e) {
+        assertTrue("Unexpected exception", e instanceof LockReleaseFailedException);
+      } finally {
+        l.release();
+      }
+    }
+
     // Verify: NativeFSLockFactory assigns null as lockPrefix if the lockDir is inside directory
     public void testNativeFSLockFactoryPrefix() throws IOException {
 

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  1 18:33:37 2010
@@ -3,4 +3,4 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/util/TestAttributeSource.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/util/TestAttributeSource.java:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/util/TestAttributeSource.java:818601-821336
-/lucene/java/trunk/src/test/org/apache/lucene/util/TestAttributeSource.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883079,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060
+/lucene/java/trunk/src/test/org/apache/lucene/util/TestAttributeSource.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883079,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,890967,890988,891189,891205,891209,891363,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060



Mime
View raw message