lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r745803 - in /lucene/java/branches/lucene_2_4: ./ CHANGES.txt src/java/org/apache/lucene/index/StoredFieldsWriter.java src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
Date Thu, 19 Feb 2009 10:10:14 GMT
Author: mikemccand
Date: Thu Feb 19 10:10:13 2009
New Revision: 745803

URL: http://svn.apache.org/viewvc?rev=745803&view=rev
Log:
LUCENE-1521 (on 2.4 branch): fix 2 cases of int overflow, during flushing

Modified:
    lucene/java/branches/lucene_2_4/   (props changed)
    lucene/java/branches/lucene_2_4/CHANGES.txt
    lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/StoredFieldsWriter.java
    lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java

Propchange: lucene/java/branches/lucene_2_4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 19 10:10:13 2009
@@ -1 +1 @@
-/lucene/java/trunk:708549,709456,712233,718540,719716,723149,734415
+/lucene/java/trunk:708549,709456,712233,718540,719716,723149,734415,735043

Modified: lucene/java/branches/lucene_2_4/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/CHANGES.txt?rev=745803&r1=745802&r2=745803&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/CHANGES.txt (original)
+++ lucene/java/branches/lucene_2_4/CHANGES.txt Thu Feb 19 10:10:13 2009
@@ -41,6 +41,9 @@
 9. LUCENE-1519: Fix int overflow bug during segment merging.  (Deepak
    via Mike McCandless)
 
+10. LUCENE-1521: Fix int overflow bug when flushing segment.
+    (Shon Vella via Mike McCandless).
+
 
 ======================= Release 2.4.0 2008-10-06 =======================
 

Modified: lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/StoredFieldsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/StoredFieldsWriter.java?rev=745803&r1=745802&r2=745803&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/StoredFieldsWriter.java
(original)
+++ lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/StoredFieldsWriter.java
Thu Feb 19 10:10:13 2009
@@ -90,7 +90,7 @@
       state.docWriter.removeOpenFile(state.docStoreSegmentName + "." + IndexFileNames.FIELDS_EXTENSION);
       state.docWriter.removeOpenFile(state.docStoreSegmentName + "." + IndexFileNames.FIELDS_INDEX_EXTENSION);
 
-      if (4+state.numDocsInStore*8 != state.directory.fileLength(state.docStoreSegmentName
+ "." + IndexFileNames.FIELDS_INDEX_EXTENSION))
+      if (4+((long) state.numDocsInStore)*8 != state.directory.fileLength(state.docStoreSegmentName
+ "." + IndexFileNames.FIELDS_INDEX_EXTENSION))
         throw new RuntimeException("after flush: fdx size mismatch: " + state.numDocsInStore
+ " docs vs " + state.directory.fileLength(state.docStoreSegmentName + "." + IndexFileNames.FIELDS_INDEX_EXTENSION)
+ " length in bytes of " + state.docStoreSegmentName + "." + IndexFileNames.FIELDS_INDEX_EXTENSION);
     }
   }

Modified: lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java?rev=745803&r1=745802&r2=745803&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
(original)
+++ lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
Thu Feb 19 10:10:13 2009
@@ -90,7 +90,7 @@
       tvd.close();
       tvx = null;
       assert state.docStoreSegmentName != null;
-      if (4+state.numDocsInStore*16 != state.directory.fileLength(state.docStoreSegmentName
+ "." + IndexFileNames.VECTORS_INDEX_EXTENSION))
+      if (4+((long) state.numDocsInStore)*16 != state.directory.fileLength(state.docStoreSegmentName
+ "." + IndexFileNames.VECTORS_INDEX_EXTENSION))
         throw new RuntimeException("after flush: tvx size mismatch: " + state.numDocsInStore
+ " docs vs " + state.directory.fileLength(state.docStoreSegmentName + "." + IndexFileNames.VECTORS_INDEX_EXTENSION)
+ " length in bytes of " + state.docStoreSegmentName + "." + IndexFileNames.VECTORS_INDEX_EXTENSION);
 
       state.flushedFiles.add(state.docStoreSegmentName + "." + IndexFileNames.VECTORS_INDEX_EXTENSION);



Mime
View raw message