diff --git a/dev-tools/doap/lucene.rdf b/dev-tools/doap/lucene.rdf
index 6e4aafcb12b..10e6f797db6 100644
--- a/dev-tools/doap/lucene.rdf
+++ b/dev-tools/doap/lucene.rdf
@@ -67,6 +67,13 @@
+
+
+ lucene-8.1.1
+ 2019-05-28
+ 8.1.1
+
+
lucene-8.1.0
diff --git a/dev-tools/doap/solr.rdf b/dev-tools/doap/solr.rdf
index 1354272db06..0d188060498 100644
--- a/dev-tools/doap/solr.rdf
+++ b/dev-tools/doap/solr.rdf
@@ -67,6 +67,13 @@
+
+
+ solr-8.1.1
+ 2019-05-28
+ 8.1.1
+
+
solr-8.1.0
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index 96b187d1f6a..92f4354b7cb 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -290,7 +290,9 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
"8.0.0-cfs",
"8.0.0-nocfs",
"8.1.0-cfs",
- "8.1.0-nocfs"
+ "8.1.0-nocfs",
+ "8.1.1-cfs",
+ "8.1.1-nocfs"
};
public static String[] getOldNames() {
@@ -299,7 +301,8 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
final static String[] oldSortedNames = {
"sorted.8.0.0",
- "sorted.8.1.0"
+ "sorted.8.1.0",
+ "sorted.8.1.1"
};
public static String[] getOldSortedNames() {
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.8.1.1-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.8.1.1-cfs.zip
new file mode 100644
index 00000000000..0062decadce
Binary files /dev/null and b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.8.1.1-cfs.zip differ
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.8.1.1-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.8.1.1-nocfs.zip
new file mode 100644
index 00000000000..34efa3d8515
Binary files /dev/null and b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.8.1.1-nocfs.zip differ
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.8.1.1.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.8.1.1.zip
new file mode 100644
index 00000000000..7e3b355f038
Binary files /dev/null and b/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.8.1.1.zip differ
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 053a3f43122..59497e10a7a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -87,7 +87,7 @@ New Features
* SOLR-11558: It would be nice if the Graph section of the Cloud tab in the Admin UI could give some more
information about the replicas of a collection (Erick Erickson)
-
+
* SOLR-13468: autoscaling/suggestions should be able to give suggestions from config sent as a payload (noble)
* SOLR-12304: The MoreLikeThisComponent now supports the mlt.interestingTerms parameter. Previously this option was
@@ -97,6 +97,11 @@ New Features
* SOLR-13493: /autoscaling/suggestions to be able to filter by type (noble)
+* SOLR-13494: Add DeepRandomStream implementation (Joel Bernstein)
+
+* SOLR-13504: In autoscaling policies, use an explicit 'nodeset' attribute for filtering
+ nodes instead of using them directly at the toplevel (noble)
+
Bug Fixes
----------------------
@@ -106,6 +111,8 @@ Bug Fixes
* SOLR-12941: Fix IndexSizeTrigger to correctly work with "aboveBytes" and "splitMethod=link" parameters. (ab)
+* SOLR-13491: SolrZkClient's watch wrapper no longer allows zookeeper to hold the same watch object multiple times.
+
Other Changes
----------------------
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/LegacyNoFacetTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/LegacyNoFacetTest.java
index 7f8a5d772f4..0e817a65b36 100644
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/LegacyNoFacetTest.java
+++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/LegacyNoFacetTest.java
@@ -69,11 +69,17 @@ public class LegacyNoFacetTest extends LegacyAbstractAnalyticsTest {
defaults.put("string_sd", "str0");
intTestStart = new ArrayList<>();
+ intMissing = 0;
longTestStart = new ArrayList<>();
+ longMissing = 0;
floatTestStart = new ArrayList<>();
+ floatMissing = 0;
doubleTestStart = new ArrayList<>();
+ doubleMissing = 0;
dateTestStart = new ArrayList<>();
+ dateMissing = 0;
stringTestStart = new ArrayList<>();
+ stringMissing = 0;
for (int j = 0; j < NUM_LOOPS; ++j) {
int i = j%INT;
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetCloudTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetCloudTest.java
index b62a819d113..df3bf79ccbe 100644
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetCloudTest.java
+++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyQueryFacetCloudTest.java
@@ -22,6 +22,7 @@ import java.util.List;
import org.apache.solr.client.solrj.request.UpdateRequest;
import org.apache.solr.common.util.NamedList;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -34,11 +35,19 @@ public class LegacyQueryFacetCloudTest extends LegacyAbstractAnalyticsFacetCloud
private static final int STRING = 7;
private static final int NUM_LOOPS = 100;
- private static ArrayList> int1TestStart = new ArrayList<>();
- private static ArrayList> int2TestStart = new ArrayList<>();
- private static ArrayList> longTestStart = new ArrayList<>();
- private static ArrayList> floatTestStart = new ArrayList<>();
+ private static final ArrayList> int1TestStart = new ArrayList<>();
+ private static final ArrayList> int2TestStart = new ArrayList<>();
+ private static final ArrayList> longTestStart = new ArrayList<>();
+ private static final ArrayList> floatTestStart = new ArrayList<>();
+ @After
+ public void afterTest() throws Exception {
+ int1TestStart.clear();
+ int2TestStart.clear();
+ longTestStart.clear();
+ floatTestStart.clear();
+ }
+
@Before
public void beforeTest() throws Exception {
diff --git a/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterIntegrationTest.java b/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterIntegrationTest.java
index 4ad59d6b2ba..402ade6eed4 100644
--- a/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterIntegrationTest.java
+++ b/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterIntegrationTest.java
@@ -67,9 +67,10 @@ public class SolrExporterIntegrationTest extends SolrExporterTestBase {
Map jvmMetrics = metricsWithName(
getAllMetrics(), "solr_metrics_jvm_threads");
- // Include all thread states + plus overall count + number of daemon threads + number of deadlocked threads
- assertEquals(NUM_NODES * (Thread.State.values().length + 3),
- jvmMetrics.size());
+ // exact set of metrics can vary based on JVM impl (ie: windows)
+ // but there should always be at least one per known thread state per node...
+ assertTrue(jvmMetrics.toString(),
+ (NUM_NODES * Thread.State.values().length) < jvmMetrics.size());
}
@Test
diff --git a/solr/core/src/java/org/apache/solr/store/blockcache/BufferStore.java b/solr/core/src/java/org/apache/solr/store/blockcache/BufferStore.java
index fcf914aec79..cf93c9d29e4 100644
--- a/solr/core/src/java/org/apache/solr/store/blockcache/BufferStore.java
+++ b/solr/core/src/java/org/apache/solr/store/blockcache/BufferStore.java
@@ -48,6 +48,15 @@ public class BufferStore implements Store {
private final AtomicLong shardBuffercacheAllocate;
private final AtomicLong shardBuffercacheLost;
+ /**
+ * For testing only
+ *
+ * @lucene.internal
+ */
+ static void clearBufferStores() {
+ bufferStores.clear();
+ }
+
public synchronized static void initNewBuffer(int bufferSize, long totalAmount) {
initNewBuffer(bufferSize, totalAmount, null);
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java
index cbe1cdce946..240bec3fb79 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudPhrasesIdentificationComponent.java
@@ -56,7 +56,7 @@ public class TestCloudPhrasesIdentificationComponent extends SolrCloudTestCase {
/** A basic client for operations at the cloud level, default collection will be set */
private static CloudSolrClient CLOUD_CLIENT;
/** One client per node */
- private static ArrayList CLIENTS = new ArrayList<>(5);
+ private static final ArrayList CLIENTS = new ArrayList<>(5);
@BeforeClass
private static void createMiniSolrCloudCluster() throws Exception {
@@ -114,7 +114,7 @@ public class TestCloudPhrasesIdentificationComponent extends SolrCloudTestCase {
for (HttpSolrClient client : CLIENTS) {
client.close();
}
- CLIENTS = null;
+ CLIENTS.clear();
}
public void testBasicPhrases() throws Exception {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudPseudoReturnFields.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudPseudoReturnFields.java
index d4aeae64c17..d6f07ce8762 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudPseudoReturnFields.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudPseudoReturnFields.java
@@ -58,7 +58,7 @@ public class TestCloudPseudoReturnFields extends SolrCloudTestCase {
/** A basic client for operations at the cloud level, default collection will be set */
private static CloudSolrClient CLOUD_CLIENT;
/** One client per node */
- private static ArrayList CLIENTS = new ArrayList<>(5);
+ private static final ArrayList CLIENTS = new ArrayList<>(5);
@BeforeClass
private static void createMiniSolrCloudCluster() throws Exception {
@@ -114,7 +114,7 @@ public class TestCloudPseudoReturnFields extends SolrCloudTestCase {
for (HttpSolrClient client : CLIENTS) {
client.close();
}
- CLIENTS = null;
+ CLIENTS.clear();
}
public void testMultiValued() throws Exception {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestRandomFlRTGCloud.java b/solr/core/src/test/org/apache/solr/cloud/TestRandomFlRTGCloud.java
index fd915bb0980..ea95fef4d23 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestRandomFlRTGCloud.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestRandomFlRTGCloud.java
@@ -66,7 +66,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
/** A basic client for operations at the cloud level, default collection will be set */
private static CloudSolrClient CLOUD_CLIENT;
/** One client per node */
- private static List CLIENTS = Collections.synchronizedList(new ArrayList<>(5));
+ private static final List CLIENTS = Collections.synchronizedList(new ArrayList<>(5));
/** Always included in fl so we can vet what doc we're looking at */
private static final FlValidator ID_VALIDATOR = new SimpleFieldValueValidator("id");
@@ -159,7 +159,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
for (HttpSolrClient client : CLIENTS) {
client.close();
}
- CLIENTS = null;
+ CLIENTS.clear();
}
/**
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/HttpTriggerListenerTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/HttpTriggerListenerTest.java
index cb10457cacf..1eb9f7631bd 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/HttpTriggerListenerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/HttpTriggerListenerTest.java
@@ -110,7 +110,7 @@ public class HttpTriggerListenerTest extends SolrCloudTestCase {
response = solrClient.request(req);
assertEquals(response.get("result").toString(), "success");
- assertEquals(requests.toString(), 0, requests.size());
+ assertEquals(mockService.requests.toString(), 0, mockService.requests.size());
cluster.startJettySolrRunner();
cluster.waitForAllNodes(30);
@@ -119,25 +119,25 @@ public class HttpTriggerListenerTest extends SolrCloudTestCase {
Thread.sleep(5000);
- assertEquals(requests.toString(), 4, requests.size());
- requests.forEach(s -> assertTrue(s.contains("Content-Type: application/json")));
- requests.forEach(s -> assertTrue(s.contains("X-Foo: foo")));
- requests.forEach(s -> assertTrue(s.contains("source=node_added_trigger")));
- requests.forEach(s -> assertTrue(s.contains("type=NODEADDED")));
+ assertEquals(mockService.requests.toString(), 4, mockService.requests.size());
+ mockService.requests.forEach(s -> assertTrue(s.contains("Content-Type: application/json")));
+ mockService.requests.forEach(s -> assertTrue(s.contains("X-Foo: foo")));
+ mockService.requests.forEach(s -> assertTrue(s.contains("source=node_added_trigger")));
+ mockService.requests.forEach(s -> assertTrue(s.contains("type=NODEADDED")));
- String request = requests.get(0);
+ String request = mockService.requests.get(0);
assertTrue(request, request.startsWith("/foo/test/STARTED"));
assertTrue(request, request.contains("actionName=,")); // empty actionName
- request = requests.get(1);
+ request = mockService.requests.get(1);
assertTrue(request, request.startsWith("/foo/test/BEFORE_ACTION"));
assertTrue(request, request.contains("actionName=test,")); // actionName
- request = requests.get(2);
+ request = mockService.requests.get(2);
assertTrue(request, request.startsWith("/foo/test/AFTER_ACTION"));
assertTrue(request, request.contains("actionName=test,")); // actionName
- request = requests.get(3);
+ request = mockService.requests.get(3);
assertTrue(request, request.startsWith("/foo/test/SUCCEEDED"));
assertTrue(request, request.contains("actionName=,")); // empty actionName
}
@@ -150,12 +150,10 @@ public class HttpTriggerListenerTest extends SolrCloudTestCase {
}
}
-
- static List requests = new ArrayList<>();
-
private static class MockService extends Thread {
- Server server;
-
+ public final List requests = new ArrayList<>();
+ private Server server;
+
public void start() {
server = new Server(new InetSocketAddress("localhost", 0));
server.setHandler(new AbstractHandler() {
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/IndexSizeTriggerTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/IndexSizeTriggerTest.java
index faf1407801d..d34e081f492 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/IndexSizeTriggerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/IndexSizeTriggerTest.java
@@ -57,7 +57,6 @@ import org.apache.solr.common.cloud.ZkNodeProps;
import org.apache.solr.common.params.CollectionParams;
import org.apache.solr.common.params.CommonAdminParams;
import org.apache.solr.common.params.CommonParams;
-import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.UpdateParams;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.Pair;
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/MetricTriggerIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/MetricTriggerIntegrationTest.java
index 07b93b90a29..da06a75410d 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/MetricTriggerIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/MetricTriggerIntegrationTest.java
@@ -22,8 +22,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -61,11 +59,9 @@ public class MetricTriggerIntegrationTest extends SolrCloudTestCase {
private static final TimeSource timeSource = TimeSource.NANO_TIME;
- static Map> listenerEvents = new HashMap<>();
- static CountDownLatch listenerCreated = new CountDownLatch(1);
+ static final Map> listenerEvents = new HashMap<>();
private static CountDownLatch triggerFiredLatch;
private static int waitForSeconds = 1;
- private static Set events = ConcurrentHashMap.newKeySet();
@BeforeClass
public static void setupCluster() throws Exception {
@@ -77,6 +73,7 @@ public class MetricTriggerIntegrationTest extends SolrCloudTestCase {
CloudTestUtils.waitForTriggerToBeScheduled(cluster.getOpenOverseer().getSolrCloudManager(), ".scheduled_maintenance");
CloudTestUtils.suspendTrigger(cluster.getOpenOverseer().getSolrCloudManager(), ".scheduled_maintenance");
+ listenerEvents.clear();
triggerFiredLatch = new CountDownLatch(1);
}
@@ -211,7 +208,6 @@ public class MetricTriggerIntegrationTest extends SolrCloudTestCase {
@Override
public void process(TriggerEvent event, ActionContext context) throws Exception {
try {
- events.add(event);
long currentTimeNanos = context.getCloudManager().getTimeSource().getTimeNs();
long eventTimeNanos = event.getEventTime();
long waitForNanos = TimeUnit.NANOSECONDS.convert(waitForSeconds, TimeUnit.SECONDS) - WAIT_FOR_DELTA_NANOS;
@@ -231,7 +227,6 @@ public class MetricTriggerIntegrationTest extends SolrCloudTestCase {
@Override
public void configure(SolrResourceLoader loader, SolrCloudManager cloudManager, AutoScalingConfig.TriggerListenerConfig config) throws TriggerValidationException {
super.configure(loader, cloudManager, config);
- listenerCreated.countDown();
timeSource = cloudManager.getTimeSource();
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/ScheduledTriggerIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/ScheduledTriggerIntegrationTest.java
index 4c3978f29aa..af6a761d6de 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/ScheduledTriggerIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/ScheduledTriggerIntegrationTest.java
@@ -52,8 +52,8 @@ public class ScheduledTriggerIntegrationTest extends SolrCloudTestCase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static CountDownLatch triggerFiredLatch;
- private static Set events = ConcurrentHashMap.newKeySet();
- private static AtomicReference