You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2012/09/19 14:22:00 UTC
svn commit: r1387546 - in /lucene/dev/branches/branch_4x: ./ lucene/
lucene/facet/
lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/
lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/
Author: shaie
Date: Wed Sep 19 12:22:00 2012
New Revision: 1387546
URL: http://svn.apache.org/viewvc?rev=1387546&view=rev
Log:
LUCENE-4402: TestAddTaxonomy.testConcurrency failure (4x)
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/facet/ (props changed)
lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java
Modified: lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java?rev=1387546&r1=1387545&r2=1387546&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java Wed Sep 19 12:22:00 2012
@@ -856,13 +856,7 @@ public class DirectoryTaxonomyWriter imp
String value = te.term().utf8ToString();
cp.clear();
cp.add(value, Consts.DEFAULT_DELIMITER);
- int ordinal = findCategory(cp);
- if (ordinal < 0) {
- // NOTE: call addCategory so that it works well in a multi-threaded
- // environment, in case e.g. a thread just added the category, after
- // the findCategory() call above failed to find it.
- ordinal = addCategory(cp);
- }
+ final int ordinal = addCategory(cp);
docs = te.docs(null, docs, 0);
ordinalMap.addMapping(docs.nextDoc() + base, ordinal);
}
Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java?rev=1387546&r1=1387545&r2=1387546&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java Wed Sep 19 12:22:00 2012
@@ -191,7 +191,7 @@ public class TestAddTaxonomy extends Luc
public void testConcurrency() throws Exception {
// tests that addTaxonomy and addCategory work in parallel
- final int numCategories = atLeast(5000);
+ final int numCategories = atLeast(10000);
// build an input taxonomy index
Directory src = newDirectory();