From 53270bdb9ca79f059b373b6cc1cbbc5ee187db84 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Fri, 20 Jan 2012 01:41:54 +0000 Subject: [PATCH] LUCENE-3711: add CHANGES entry git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1233708 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 6 ++++++ .../org/apache/lucene/util/TestSentinelIntSet.java | 12 ------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 4bc3cf52406..61416ef1f2f 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -825,6 +825,12 @@ Bug fixes * LUCENE-3605: don't sleep in a retry loop when trying to locate the segments_N file (Robert Muir, Mike McCandless) +* LUCENE-3711: SentinelIntSet with a small initial size can go into + an infinite loop when expanded. This can affect grouping using + TermAllGroupsCollector or TermAllGroupHeadsCollector if instantiated with a + non default small size. (Martijn van Groningen, yonik) + + Optimizations * LUCENE-3653: Improve concurrency in VirtualMethod and AttributeSource by diff --git a/lucene/src/test/org/apache/lucene/util/TestSentinelIntSet.java b/lucene/src/test/org/apache/lucene/util/TestSentinelIntSet.java index 736596f0ff1..46511340dc7 100644 --- a/lucene/src/test/org/apache/lucene/util/TestSentinelIntSet.java +++ b/lucene/src/test/org/apache/lucene/util/TestSentinelIntSet.java @@ -48,18 +48,6 @@ public class TestSentinelIntSet extends LuceneTestCase { assertEquals(24, set.rehashCount); } - @Test - public void testRehash() throws Exception { - SentinelIntSet set = new SentinelIntSet(3, -1); - set.put(1); - set.find(99); - set.put(2); - set.find(99); - set.put(3); - set.find(99); - set.put(4); - set.find(99); - } @Test public void testRandom() throws Exception {