You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2021/10/27 06:35:46 UTC

[lucene-solr] branch jira/SOLR15722 created (now d6e8cc1)

This is an automated email from the ASF dual-hosted git repository.

noble pushed a change to branch jira/SOLR15722
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


      at d6e8cc1  added test

This branch includes the following new commits:

     new 757d06f  fixed the bug
     new d6e8cc1  added test

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[lucene-solr] 01/02: fixed the bug

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 757d06f1bdb4ce3a56f48b0eb074d1931627f49a
Author: Noble Paul <no...@gmail.com>
AuthorDate: Wed Oct 27 14:53:14 2021 +1100

    fixed the bug
---
 solr/core/src/java/org/apache/solr/cloud/overseer/SliceMutator.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/overseer/SliceMutator.java b/solr/core/src/java/org/apache/solr/cloud/overseer/SliceMutator.java
index d0f08cc..c57cdbd 100644
--- a/solr/core/src/java/org/apache/solr/cloud/overseer/SliceMutator.java
+++ b/solr/core/src/java/org/apache/solr/cloud/overseer/SliceMutator.java
@@ -131,7 +131,8 @@ public class SliceMutator {
 
 
     if (coll.isPerReplicaState()) {
-      return new ZkWriteCommand(collection, coll.copyWithSlices(newSlices), PerReplicaStatesOps.deleteReplica(cnn, coll.getPerReplicaStates()) , true);
+      PerReplicaStatesOps replicaOps = PerReplicaStatesOps.deleteReplica(cnn, PerReplicaStates.fetch(coll.getZNode(), zkClient, coll.getPerReplicaStates()) );
+      return new ZkWriteCommand(collection, coll.copyWithSlices(newSlices), replicaOps, true);
     } else {
       return new ZkWriteCommand(collection, coll.copyWithSlices(newSlices));
     }

[lucene-solr] 02/02: added test

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d6e8cc1807025c848ebc0cd28ad39f98c16ffc34
Author: Noble Paul <no...@gmail.com>
AuthorDate: Wed Oct 27 17:35:22 2021 +1100

    added test
---
 .../test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
index 6f94315..853b3e3 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
@@ -1121,6 +1121,11 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
     prs = PerReplicaStates.fetch(ZkStateReader.getCollectionPath(testCollection), cluster.getZkClient(), null);
     assertEquals(5, prs.states.size());
 
+    c = cluster.getSolrClient().getZkStateReader().getCollection(testCollection);
+    Replica toDelete = c.getReplica((shard, replica) -> "shard1".equals(shard) && !replica.isLeader());
+    CollectionAdminRequest.deleteReplica(testCollection, "shard1", toDelete.getName()).process(cluster.getSolrClient());
+    cluster.waitForActiveCollection(testCollection, 2, 4);
+
     testCollection = "perReplicaState_testv2";
     new V2Request.Builder("/collections")
         .withMethod(POST)