You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2017/02/28 17:26:52 UTC
[25/50] [abbrv] lucene-solr:jira/solr-9045: LUCENE-7710:
BlockPackedReader now throws CorruptIndexException if bitsPerValue is out of
bounds, not generic IOException
LUCENE-7710: BlockPackedReader now throws CorruptIndexException if bitsPerValue is out of bounds, not generic IOException
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/cab3aae1
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/cab3aae1
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/cab3aae1
Branch: refs/heads/jira/solr-9045
Commit: cab3aae11dd6e781acabf513095eb11606feddde
Parents: 2e56c0e
Author: Mike McCandless <mi...@apache.org>
Authored: Fri Feb 24 17:13:49 2017 -0500
Committer: Mike McCandless <mi...@apache.org>
Committed: Fri Feb 24 17:13:49 2017 -0500
----------------------------------------------------------------------
lucene/CHANGES.txt | 4 ++++
.../java/org/apache/lucene/util/packed/BlockPackedReader.java | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cab3aae1/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 5d3a077..1d45ab8 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -178,6 +178,10 @@ Improvements
earlier than regular queries in order to improve cache efficiency.
(Adrien Grand)
+* LUCENE-7710: BlockPackedReader throws CorruptIndexException and includes
+ IndexInput description instead of plain IOException (Mike Drob via
+ Mike McCandless)
+
Optimizations
* LUCENE-7641: Optimized point range queries to compute documents that do not
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cab3aae1/lucene/core/src/java/org/apache/lucene/util/packed/BlockPackedReader.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BlockPackedReader.java b/lucene/core/src/java/org/apache/lucene/util/packed/BlockPackedReader.java
index 82bf93f..986cba7 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/BlockPackedReader.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/BlockPackedReader.java
@@ -28,6 +28,7 @@ import static org.apache.lucene.util.packed.PackedInts.numBlocks;
import java.io.IOException;
+import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.util.Accountable;
import org.apache.lucene.util.LongValues;
@@ -58,7 +59,7 @@ public final class BlockPackedReader extends LongValues implements Accountable {
final int bitsPerValue = token >>> BPV_SHIFT;
sumBPV += bitsPerValue;
if (bitsPerValue > 64) {
- throw new IOException("Corrupted");
+ throw new CorruptIndexException("Corrupted Block#" + i, in);
}
if ((token & MIN_VALUE_EQUALS_0) == 0) {
if (minValues == null) {