Skip to content

Commit

Permalink
SOLR-12513 Reproducing TestCodecSupport.testMixedCompressionMode failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Erick Erickson committed Jun 25, 2018
1 parent 8c71434 commit 1d85cd7
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 1,271 deletions.
1,164 changes: 0 additions & 1,164 deletions lucene/tools/junit4/cached-timehints.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ Bug Fixes

* SOLR-12482: Config API returns status 0 for failed operations. (Steve Rowe)

* SOLR-12513: Reproducing TestCodecSupport.testMixedCompressionMode failure (Erick Erickson)

Optimizations
----------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void testMixedCompressionMode() throws Exception {
"//*[@numFound='3']");
assertQ(req("q", "text:foo"),
"//*[@numFound='3']");
assertU(optimize());
assertU(optimize("maxSegments", "1"));
assertCompressionMode("BEST_SPEED", h.getCore());
System.clearProperty("tests.COMPRESSION_MODE");
}
Expand Down
16 changes: 13 additions & 3 deletions solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@
import org.apache.solr.index.LogByteSizeMergePolicyFactory;
import org.apache.solr.index.LogDocMergePolicyFactory;
import org.apache.solr.index.MergePolicyFactory;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.search.SolrIndexSearcher;
import org.apache.solr.update.CommitUpdateCommand;
import org.apache.solr.update.SolrIndexConfigTest;
import org.apache.solr.update.UpdateHandler;
import org.apache.solr.util.RefCounted;
import org.junit.After;

Expand Down Expand Up @@ -123,7 +126,7 @@ public void testTieredMergePolicyConfig() throws Exception {
assertNumSegments(h.getCore(), 2);
assertCompoundSegments(h.getCore(), expectCFS);

assertU(optimize());
assertU(optimize("maxSegments", "1"));
assertNumSegments(h.getCore(), 1);
// we've now forced a merge, and the MP ratio should be in play
assertCompoundSegments(h.getCore(), false);
Expand All @@ -146,6 +149,15 @@ public void testNoMergePolicyFactoryConfig() throws Exception {
initCore("solrconfig-nomergepolicyfactory.xml","schema-minimal.xml");
iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore());
assertEquals(mergePolicy, iwc.getMergePolicy());

UpdateHandler updater = h.getCore().getUpdateHandler();
SolrQueryRequest req = req();
CommitUpdateCommand cmtCmd = new CommitUpdateCommand(req, true);
cmtCmd.maxOptimizeSegments = -1;
expectThrows(IllegalArgumentException.class, () -> {
updater.commit(cmtCmd);
});

}

public void testLogMergePolicyFactoryConfig() throws Exception {
Expand Down Expand Up @@ -180,7 +192,6 @@ private void implTestLogMergePolicyConfig(String solrConfigFileName,

assertEquals(11, logMP.getMergeFactor());
assertEquals(456, logMP.getMaxMergeDocs());

}

/**
Expand Down Expand Up @@ -256,5 +267,4 @@ private static void assertCompoundSegments(IndexReader reader,
((SegmentReader)atomic.reader()).getSegmentInfo().info.getUseCompoundFile());
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ private static class RetrievalCombo {
private void testRptWithGeometryField(String fieldName) throws Exception {
assertU(adoc("id", "0", fieldName, "ENVELOPE(-10, 20, 15, 10)"));
assertU(adoc("id", "1", fieldName, "BUFFER(POINT(-10 15), 5)"));//circle at top-left corner
assertU(optimize());// one segment.
assertU(optimize("maxSegments", "1"));// one segment.
assertU(commit());

// Search to the edge but not quite touching the indexed envelope of id=0. It requires geom validation to
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public void testExpungeDeletes() throws Exception {
@Test
public void testPrepareCommit() throws Exception {
assertU(adoc("id", "999"));
assertU(optimize()); // make sure there's just one segment
assertU(optimize("maxSegments", "1")); // make sure there's just one segment
assertU(commit()); // commit a second time to make sure index files aren't still referenced by the old searcher

SolrQueryRequest sr = req();
Expand Down

0 comments on commit 1d85cd7

Please sign in to comment.