lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r745801 - in /lucene/java/branches/lucene_2_4: ./ CHANGES.txt src/java/org/apache/lucene/index/SegmentMerger.java
Date Thu, 19 Feb 2009 10:06:55 GMT
Author: mikemccand
Date: Thu Feb 19 10:06:55 2009
New Revision: 745801

URL: http://svn.apache.org/viewvc?rev=745801&view=rev
Log:
LUCENE-1519: fix int overflow bug during merging

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/SegmentMerger.java

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

Modified: lucene/java/branches/lucene_2_4/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/CHANGES.txt?rev=745801&r1=745800&r2=745801&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/CHANGES.txt (original)
+++ lucene/java/branches/lucene_2_4/CHANGES.txt Thu Feb 19 10:06:55 2009
@@ -38,6 +38,9 @@
    both bits() and getDocIdSet() methods are called. (Matt Jones via
    Mike McCandless)
 
+9. LUCENE-1519: Fix int overflow bug during segment merging.  (Deepak
+   via Mike McCandless)
+
 
 ======================= Release 2.4.0 2008-10-06 =======================
 

Modified: lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/SegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/SegmentMerger.java?rev=745801&r1=745800&r2=745801&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/SegmentMerger.java (original)
+++ lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/SegmentMerger.java Thu
Feb 19 10:06:55 2009
@@ -373,7 +373,7 @@
 
       final long fdxFileLength = directory.fileLength(segment + "." + IndexFileNames.FIELDS_INDEX_EXTENSION);
 
-      if (4+docCount*8 != fdxFileLength)
+      if (4+((long) docCount)*8 != fdxFileLength)
         // This is most likely a bug in Sun JRE 1.6.0_04/_05;
         // we detect that the bug has struck, here, and
         // throw an exception to prevent the corruption from
@@ -467,7 +467,7 @@
 
     final long tvxSize = directory.fileLength(segment + "." + IndexFileNames.VECTORS_INDEX_EXTENSION);
 
-    if (4+mergedDocs*16 != tvxSize)
+    if (4+((long) mergedDocs)*16 != tvxSize)
       // This is most likely a bug in Sun JRE 1.6.0_04/_05;
       // we detect that the bug has struck, here, and
       // throw an exception to prevent the corruption from



Mime
View raw message