lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1028886 - in /lucene/java/branches/lucene_2_9: ./ contrib/ contrib/analyzers/ contrib/analyzers/common/ contrib/analyzers/common/src/test/ contrib/analyzers/smartcn/ contrib/highlighter/ contrib/highlighter/src/test/ contrib/instantiated/s...
Date Fri, 29 Oct 2010 19:51:49 GMT
Author: mikemccand
Date: Fri Oct 29 19:51:48 2010
New Revision: 1028886

URL: http://svn.apache.org/viewvc?rev=1028886&view=rev
Log:
LUCENE-2513: don't overwrite future commits when opening past commit in writeable IndexReader

Modified:
    lucene/java/branches/lucene_2_9/   (props changed)
    lucene/java/branches/lucene_2_9/CHANGES.txt   (contents, props changed)
    lucene/java/branches/lucene_2_9/build.xml   (props changed)
    lucene/java/branches/lucene_2_9/contrib/   (props changed)
    lucene/java/branches/lucene_2_9/contrib/CHANGES.txt   (props changed)
    lucene/java/branches/lucene_2_9/contrib/analyzers/   (props changed)
    lucene/java/branches/lucene_2_9/contrib/analyzers/common/   (props changed)
    lucene/java/branches/lucene_2_9/contrib/analyzers/common/src/test/   (props changed)
    lucene/java/branches/lucene_2_9/contrib/analyzers/smartcn/   (props changed)
    lucene/java/branches/lucene_2_9/contrib/highlighter/   (props changed)
    lucene/java/branches/lucene_2_9/contrib/highlighter/src/test/   (props changed)
    lucene/java/branches/lucene_2_9/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java   (props changed)
    lucene/java/branches/lucene_2_9/src/   (props changed)
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/BaseCharFilter.java   (props changed)
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/Tokenizer.java   (props changed)
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/DirectoryReader.java
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexFileDeleter.java
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java   (props changed)
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/util/AttributeSource.java   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestDateTools.java   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestNumberTools.java   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/search/spans/TestSpans.java   (props changed)
    lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/util/TestAttributeSource.java   (props changed)

Propchange: lucene/java/branches/lucene_2_9/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/dev/branches/branch_3x/lucene:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
 /lucene/java/branches/lucene_2_4:748824
-/lucene/java/branches/lucene_3_0:886275,889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/java/branches/lucene_3_0:886275,889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk:821888,824125,826029,826385,830871,833095,833297,833886,834035,836155,881819,882672,883554,884870,886257,887347,887532,887670,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Modified: lucene/java/branches/lucene_2_9/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/CHANGES.txt?rev=1028886&r1=1028885&r2=1028886&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/CHANGES.txt (original)
+++ lucene/java/branches/lucene_2_9/CHANGES.txt Fri Oct 29 19:51:48 2010
@@ -15,6 +15,9 @@ Bug fixes
   throws an exception when term count exceeds doc count.
   (Mike McCandless, Uwe Schindler)
 
+* LUCENE-2513: when opening writable IndexReader on a not-current
+  commit, do not overwrite "future" commits.  (Mike McCandless)
+
 * LUCENE-2536: IndexWriter.rollback was failing to properly rollback
   buffered deletions against segments that were flushed (Mark Harwood
   via Mike McCandless)

Propchange: lucene/java/branches/lucene_2_9/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/CHANGES.txt:941394,946651,948430,957490,984210
-/lucene/dev/trunk/lucene/CHANGES.txt:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,994979
-/lucene/java/branches/lucene_3_0/CHANGES.txt:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789
+/lucene/dev/branches/branch_3x/lucene/CHANGES.txt:941394,946651,948430,957490,957920,984210
+/lucene/dev/trunk/lucene/CHANGES.txt:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,994979
+/lucene/java/branches/lucene_3_0/CHANGES.txt:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028873
 /lucene/java/trunk/CHANGES.txt:821888,834035,836155,881819,886257,887347,887532,887670,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/build.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/build.xml:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/build.xml:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/build.xml:889688,891211,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/build.xml:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/build.xml:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/build.xml:889688,891211,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/build.xml:821888,834035,836155,887670,889431-889432,889579,889866,890439,891205,891209,891377,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/contrib:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/contrib:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/contrib:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/contrib:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/contrib:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/contrib:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/contrib:821888,834035,836155,881819,886257,887347,887532,887670,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/contrib/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/contrib/CHANGES.txt:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/contrib/CHANGES.txt:889688,891211,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028827
+/lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/contrib/CHANGES.txt:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/contrib/CHANGES.txt:889688,891211,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028827,1028873
 /lucene/java/trunk/contrib/CHANGES.txt:821888,834035,836155,887670,889431-889432,889579,889866,890439,891205,891209,891377,899627,900196,908477,908975,909398,910034,910078,912407,915399,919060,920270

Propchange: lucene/java/branches/lucene_2_9/contrib/analyzers/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/analyzers:941394,946651,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/contrib/analyzers:939611,940730,949288,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/contrib/analyzers:950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/contrib/analyzers:941394,946651,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/contrib/analyzers:939611,940730,949288,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/contrib/analyzers:950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/contrib/analyzers:834035,836155,887670,889579,889866,890439,891205,891377,916543,919869,920270

Propchange: lucene/java/branches/lucene_2_9/contrib/analyzers/common/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common:988629,990286,999226,999847
-/lucene/dev/trunk/lucene/contrib/analyzers/common:989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/contrib/analyzers/common:990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common:957920,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/contrib/analyzers/common:957707,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/contrib/analyzers/common:990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/contrib/analyzers/common:916543,919869

Propchange: lucene/java/branches/lucene_2_9/contrib/analyzers/common/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test:999226,999847
-/lucene/dev/trunk/lucene/contrib/analyzers/common/src/test:994979,999223,999842
-/lucene/java/branches/lucene_3_0/contrib/analyzers/common/src/test:999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test:957920,999226,999847
+/lucene/dev/trunk/lucene/contrib/analyzers/common/src/test:957707,994979,999223,999842
+/lucene/java/branches/lucene_3_0/contrib/analyzers/common/src/test:999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/contrib/analyzers/common/src/test:916543,919869

Propchange: lucene/java/branches/lucene_2_9/contrib/analyzers/smartcn/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/smartcn:988629,990286,999226,999847
-/lucene/dev/trunk/lucene/contrib/analyzers/smartcn:989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/contrib/analyzers/smartcn:990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/smartcn:957920,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/contrib/analyzers/smartcn:957707,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/contrib/analyzers/smartcn:990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/contrib/analyzers/smartcn:916543,919869

Propchange: lucene/java/branches/lucene_2_9/contrib/highlighter/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/highlighter:988629,990286,999226,999847
+/lucene/dev/branches/branch_3x/lucene/contrib/highlighter:957920,988629,990286,999226,999847
 /lucene/dev/trunk/lucene/contrib/highlighter:989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/contrib/highlighter:990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/java/branches/lucene_3_0/contrib/highlighter:990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/contrib/highlighter:916543,919869

Propchange: lucene/java/branches/lucene_2_9/contrib/highlighter/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/test:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/contrib/highlighter/src/test:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/contrib/highlighter/src/test:889688,891211,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/test:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/contrib/highlighter/src/test:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/contrib/highlighter/src/test:889688,891211,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/contrib/highlighter/src/test:821888,834035,836155,887670,889431-889432,889579,889866,890439,891205,891209,891377,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,7 +1,7 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/dev/branches/branch_3x/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
 /lucene/java/branches/lucene_2_4/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:748824
 /lucene/java/branches/lucene_2_9/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:817269-818599
 /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,889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/java/branches/lucene_3_0/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:889463,889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:821888,834035,836155,881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/src/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src:957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/src:963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/src:963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/src:957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/src:957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/src:963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src:916543,919869

Propchange: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/BaseCharFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -0,0 +1 @@
+/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/analysis/BaseCharFilter.java:957920

Propchange: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/Tokenizer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/analysis/Tokenizer.java:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/Tokenizer.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/analysis/Tokenizer.java:889688,891211,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/analysis/Tokenizer.java:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/Tokenizer.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/analysis/Tokenizer.java:889688,891211,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java:821888,834035,836155,887670,889579,889866,890439,891205,891377,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/DirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/DirectoryReader.java?rev=1028886&r1=1028885&r2=1028886&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/DirectoryReader.java (original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/DirectoryReader.java Fri Oct 29 19:51:48 2010
@@ -63,6 +63,11 @@ class DirectoryReader extends IndexReade
   private int numDocs = -1;
   private boolean hasDeletions = false;
 
+  // Max version in index as of when we opened; this can be
+  // > our current segmentInfos version in case we were
+  // opened on a past IndexCommit:
+  private long maxIndexVersion;
+
   static IndexReader open(final Directory directory, final IndexDeletionPolicy deletionPolicy, final IndexCommit commit, final boolean readOnly,
                           final int termInfosIndexDivisor) throws CorruptIndexException, IOException {
     return (IndexReader) new SegmentInfos.FindSegmentsFile(directory) {
@@ -299,7 +304,7 @@ class DirectoryReader extends IndexReade
     }
   }
 
-  private void initialize(SegmentReader[] subReaders) {
+  private void initialize(SegmentReader[] subReaders) throws IOException {
     this.subReaders = subReaders;
     starts = new int[subReaders.length + 1];    // build starts array
     for (int i = 0; i < subReaders.length; i++) {
@@ -310,6 +315,10 @@ class DirectoryReader extends IndexReade
         hasDeletions = true;
     }
     starts[subReaders.length] = maxDoc;
+
+    if (!readOnly) {
+      maxIndexVersion = SegmentInfos.readCurrentVersion(directory);
+    }
   }
 
   public final synchronized Object clone() {
@@ -675,8 +684,9 @@ class DirectoryReader extends IndexReade
         this.writeLock = writeLock;
 
         // we have to check whether index has changed since this reader was opened.
-        // if so, this reader is no longer valid for deletion
-        if (SegmentInfos.readCurrentVersion(directory) > segmentInfos.getVersion()) {
+        // if so, this reader is no longer valid for
+        // deletion
+        if (SegmentInfos.readCurrentVersion(directory) > maxIndexVersion) {
           stale = true;
           this.writeLock.release();
           this.writeLock = null;
@@ -707,6 +717,7 @@ class DirectoryReader extends IndexReade
       IndexFileDeleter deleter = new IndexFileDeleter(directory,
                                                       deletionPolicy == null ? new KeepOnlyLastCommitDeletionPolicy() : deletionPolicy,
                                                       segmentInfos, null, null);
+      segmentInfos.updateGeneration(deleter.getLastSegmentInfos());
 
       // Checkpoint the state we are about to change, in
       // case we have to roll back:
@@ -753,6 +764,8 @@ class DirectoryReader extends IndexReade
       deleter.checkpoint(segmentInfos, true);
       deleter.close();
 
+      maxIndexVersion = segmentInfos.getVersion();
+
       if (writeLock != null) {
         writeLock.release();  // release write lock
         writeLock = null;

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexFileDeleter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexFileDeleter.java?rev=1028886&r1=1028885&r2=1028886&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexFileDeleter.java (original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexFileDeleter.java Fri Oct 29 19:51:48 2010
@@ -106,6 +106,7 @@ final class IndexFileDeleter {
   private DocumentsWriter docWriter;
 
   final boolean startingCommitDeleted;
+  private SegmentInfos lastSegmentInfos;
 
   /** Change to true to see details of reference counts when
    *  infoStream != null */
@@ -164,33 +165,44 @@ final class IndexFileDeleter {
           // This is a commit (segments or segments_N), and
           // it's valid (<= the max gen).  Load it, then
           // incref all files it refers to:
-          if (SegmentInfos.generationFromSegmentsFileName(fileName) <= currentGen) {
+          if (infoStream != null) {
+            message("init: load commit \"" + fileName + "\"");
+          }
+          SegmentInfos sis = new SegmentInfos();
+          try {
+            sis.read(directory, fileName);
+          } catch (FileNotFoundException e) {
+            // LUCENE-948: on NFS (and maybe others), if
+            // you have writers switching back and forth
+            // between machines, it's very likely that the
+            // dir listing will be stale and will claim a
+            // file segments_X exists when in fact it
+            // doesn't.  So, we catch this and handle it
+            // as if the file does not exist
             if (infoStream != null) {
-              message("init: load commit \"" + fileName + "\"");
+              message("init: hit FileNotFoundException when loading commit \"" + fileName + "\"; skipping this commit point");
             }
-            SegmentInfos sis = new SegmentInfos();
-            try {
-              sis.read(directory, fileName);
-            } catch (FileNotFoundException e) {
-              // LUCENE-948: on NFS (and maybe others), if
-              // you have writers switching back and forth
-              // between machines, it's very likely that the
-              // dir listing will be stale and will claim a
-              // file segments_X exists when in fact it
-              // doesn't.  So, we catch this and handle it
-              // as if the file does not exist
-              if (infoStream != null) {
-                message("init: hit FileNotFoundException when loading commit \"" + fileName + "\"; skipping this commit point");
-              }
+            sis = null;
+          } catch (IOException e) {
+            if (SegmentInfos.generationFromSegmentsFileName(fileName) <= currentGen) {
+              throw e;
+            } else {
+              // Most likely we are opening an index that
+              // has an aborted "future" commit, so suppress
+              // exc in this case
               sis = null;
             }
-            if (sis != null) {
-              CommitPoint commitPoint = new CommitPoint(commitsToDelete, directory, sis);
-              if (sis.getGeneration() == segmentInfos.getGeneration()) {
-                currentCommitPoint = commitPoint;
-              }
-              commits.add(commitPoint);
-              incRef(sis, true);
+          }
+          if (sis != null) {
+            CommitPoint commitPoint = new CommitPoint(commitsToDelete, directory, sis);
+            if (sis.getGeneration() == segmentInfos.getGeneration()) {
+              currentCommitPoint = commitPoint;
+            }
+            commits.add(commitPoint);
+            incRef(sis, true);
+
+            if (lastSegmentInfos == null || sis.getGeneration() > lastSegmentInfos.getGeneration()) {
+              lastSegmentInfos = sis;
             }
           }
         }
@@ -249,6 +261,10 @@ final class IndexFileDeleter {
     deleteCommits();
   }
 
+  public SegmentInfos getLastSegmentInfos() {
+    return lastSegmentInfos;
+  }
+
   /**
    * Remove the CommitPoints in the commitsToDelete List by
    * DecRef'ing all files from each SegmentInfos.

Propchange: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:821888,834035,836155,881819,886257,887347,887532,887670,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/util/AttributeSource.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,5 +1,5 @@
 /lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/AttributeSource.java:946651
 /lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeSource.java:929738,932398,935522,940730,946599,949976,949997,950613,951521,989785
 /lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/util/AttributeSource.java:748824
-/lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/util/AttributeSource.java:886275,889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/util/AttributeSource.java:886275,889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/java/org/apache/lucene/util/AttributeSource.java:821888,824125,826029,826385,830871,833095,833297,833886,834035,836155,881819,882672,883554,884870,886257,887347,887532,887670,889579,889866,890439,891189,891205,891363,894348,897672,908975,910034,910078,912407,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,5 +1,5 @@
 /lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java:946651
 /lucene/dev/trunk/lucene/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java:929738,932398,935522,940730,946599,949976,949997,950613,951521,989785
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java:748824
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java:886275,889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java:886275,889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java:818920,821888,824125,826029,826385,830871,833095,833297,833886,834035,836155,881819,882672,883554,884870,887347,887532,887670,889579,889866,890439,891189,891205,891363,897672,908975,910034,910078,912407,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:821888,834035,836155,881819,886257,887347,887532,887670,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestDateTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/document/TestDateTools.java:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestDateTools.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestDateTools.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/document/TestDateTools.java:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestDateTools.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestDateTools.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/document/TestDateTools.java:821888,834035,836155,881819,886257,887347,887532,887670,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestNumberTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/document/TestNumberTools.java:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestNumberTools.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestNumberTools.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/document/TestNumberTools.java:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestNumberTools.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestNumberTools.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/document/TestNumberTools.java:821888,834035,836155,881819,886257,887347,887532,887670,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index:941394,946651,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index:940730,949288,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index:950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index:941394,946651,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index:940730,949288,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index:950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/index:834035,836155,887670,889579,889866,890439,891205,891377,916543,919869,920270

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:821888,834035,836155,881819,886257,887347,887532,887670,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270

Modified: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=1028886&r1=1028885&r2=1028886&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
+++ lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestIndexWriter.java Fri Oct 29 19:51:48 2010
@@ -896,6 +896,7 @@ public class TestIndexWriter extends Bas
         try {
           writer  = new IndexWriter(dir, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
         } catch (Exception e) {
+          e.printStackTrace(System.out);
           fail("writer failed to open on a crashed index");
         }
 
@@ -4807,4 +4808,96 @@ public class TestIndexWriter extends Bas
     _TestUtil.checkIndex(dir);
     dir.close();
   }
+
+  private static class NoDeletionPolicy implements IndexDeletionPolicy {
+    public void onCommit(List commits) throws IOException {
+    }
+    public void onInit(List commits) throws IOException {
+    }
+  }
+
+  public void testFutureCommit() throws Exception {
+    Directory dir = new MockRAMDirectory();
+
+    IndexWriter w = new IndexWriter(dir, new WhitespaceAnalyzer(), new NoDeletionPolicy(), IndexWriter.MaxFieldLength.UNLIMITED);
+    Document doc = new Document();
+    w.addDocument(doc);
+
+    // commit to "first"
+    Map commitData = new HashMap();
+    commitData.put("tag", "first");
+    w.commit(commitData);
+
+    // commit to "second"
+    w.addDocument(doc);
+    commitData.put("tag", "second");
+    w.commit(commitData);
+    w.close();
+
+    // open "first" with IndexWriter
+    IndexCommit commit = null;
+    Iterator it = IndexReader.listCommits(dir).iterator();
+    while(it.hasNext()) {
+      IndexCommit c = (IndexCommit) it.next();
+      final String tag = (String) c.getUserData().get("tag");
+      if ("first".equals(tag)) {
+        commit = c;
+        break;
+      }
+    }
+
+    assertNotNull(commit);
+
+    w = new IndexWriter(dir, new WhitespaceAnalyzer(), new NoDeletionPolicy(), IndexWriter.MaxFieldLength.UNLIMITED, commit);
+
+    assertEquals(1, w.numDocs());
+    
+    // commit IndexWriter to "third"
+    w.addDocument(doc);
+    commitData.put("tag", "third");
+    w.commit(commitData);
+    w.close();
+
+    // make sure "second" commit is still there
+    commit = null;
+    it = IndexReader.listCommits(dir).iterator();
+    while(it.hasNext()) {
+      IndexCommit c = (IndexCommit) it.next();
+      final String tag = (String) c.getUserData().get("tag");
+      if ("second".equals(tag)) {
+        commit = c;
+        break;
+      }
+    }
+
+    assertNotNull(commit);
+
+    IndexReader r = IndexReader.open(commit, true);
+    assertEquals(2, r.numDocs());
+    r.close();
+
+    // open "second", w/ writeable IndexReader & commit
+    r = IndexReader.open(commit, new NoDeletionPolicy(), false);
+    assertEquals(2, r.numDocs());
+    r.deleteDocument(0);
+    r.deleteDocument(1);
+    commitData.put("tag", "fourth");
+    r.commit(commitData);
+    r.close();
+
+    // make sure "third" commit is still there
+    commit = null;
+    it = IndexReader.listCommits(dir).iterator();
+    while(it.hasNext()) {
+      IndexCommit c = (IndexCommit) it.next();
+      final String tag = (String) c.getUserData().get("tag");
+      if ("third".equals(tag)) {
+        commit = c;
+        break;
+      }
+    }
+    assertNotNull(commit);
+
+    dir.close();
+  }
 }

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java:999226,999847
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java:957920,999226,999847
 /lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java:994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java:999228,1028739,1028779,1028789,1028827
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java:999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java:916543,919869

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java:999226,999847
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java:957920,999226,999847
 /lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java:994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java:999228,1028739,1028779,1028789,1028827
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java:999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java:916543,919869

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/search/spans/TestSpans.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java:999226,999847
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java:957920,999226,999847
 /lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java:994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/spans/TestSpans.java:999228,1028739,1028779,1028789,1028827
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/spans/TestSpans.java:999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestSpans.java:916543,919869

Propchange: lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/util/TestAttributeSource.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 29 19:51:48 2010
@@ -1,4 +1,4 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/util/TestAttributeSource.java:941394,946651,948430,957490,984210,988629,990286,999226,999847
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestAttributeSource.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,989785,990281,994979,999223,999842
-/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/util/TestAttributeSource.java:941394,946651,948430,957490,957920,984210,988629,990286,999226,999847
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestAttributeSource.java:929738,932398,935522,938989,939611,939649,940730,946599,948082,948429,949288,949976,949997,950458,950613,951521,957707,963781,965103,984187,989785,990281,994979,999223,999842
+/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java:889688,891211,899639,900212,908479,909401,912383,915404,940993,948090,948432,950033,950301,950474,950580,957495,963788,965105,984217,988638,990293,995063,999228,1028739,1028779,1028789,1028827,1028873
 /lucene/java/trunk/src/test/org/apache/lucene/util/TestAttributeSource.java:821888,834035,836155,881819,886257,887347,887532,887670,889431-889432,889579,889866,890439,891189,891205,891209,891363,891377,897672,899627,900196,908477,908975,909398,910034,910078,912407,915399,916543,919060,919869,920270



Mime
View raw message