lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [lucene-solr] branch branch_8x updated: SOLR-13475: Clean up empty alias lists. Fix the ordering or operations in the test.
Date Mon, 20 May 2019 12:25:11 GMT
This is an automated email from the ASF dual-hosted git repository.

ab pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 4591f67  SOLR-13475: Clean up empty alias lists. Fix the ordering or operations in
the test.
4591f67 is described below

commit 4591f67390883dee8f39f53766e2da6467c089ab
Author: Andrzej Bialecki <ab@apache.org>
AuthorDate: Mon May 20 14:17:08 2019 +0200

    SOLR-13475: Clean up empty alias lists. Fix the ordering or operations in the test.
---
 solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java | 2 +-
 solr/solrj/src/java/org/apache/solr/common/cloud/Aliases.java      | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
index 4a636e2..a64ed7a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
@@ -543,9 +543,9 @@ public class AliasIntegrationTest extends SolrCloudTestCase {
         .commit(cluster.getSolrClient(), "collection2");
 
     ///////////////
-    CollectionAdminRequest.createAlias("testalias1", "collection1").process(cluster.getSolrClient());
     // make sure there's only one level of alias
     CollectionAdminRequest.deleteAlias("collection1").process(cluster.getSolrClient());
+    CollectionAdminRequest.createAlias("testalias1", "collection1").process(cluster.getSolrClient());
 
     // verify proper resolution on the server-side
     ZkStateReader zkStateReader = cluster.getSolrClient().getZkStateReader();
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/Aliases.java b/solr/solrj/src/java/org/apache/solr/common/cloud/Aliases.java
index c19ee58..f1fa3f1 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/Aliases.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/Aliases.java
@@ -298,6 +298,7 @@ public class Aliases {
           entry.setValue(Collections.unmodifiableList(list));
         }
       }
+      newColAliases.entrySet().removeIf(entry -> entry.getValue().isEmpty());
     } else {
       newColProperties = this.collectionAliasProperties;// no changes
       // java representation is a list, so split before adding to maintain consistency


Mime
View raw message