You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by no...@apache.org on 2022/10/13 19:54:34 UTC

[solr] branch branch_9_1 updated (be99350cd86 -> 6136a9191a8)

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

noble pushed a change to branch branch_9_1
in repository https://gitbox.apache.org/repos/asf/solr.git


    from be99350cd86 SOLR-16439: Cloud Node does not have Core, the admin UI cannot be displayed properly (#1050)
     new f00231c98de SOLR-16460: ClusterState.copyWith is buggy (#1070)
     new 6136a9191a8 CHANGES.txt

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.


Summary of changes:
 solr/CHANGES.txt                                               |  2 ++
 .../src/java/org/apache/solr/common/cloud/ClusterState.java    | 10 +++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)


[solr] 01/02: SOLR-16460: ClusterState.copyWith is buggy (#1070)

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

noble pushed a commit to branch branch_9_1
in repository https://gitbox.apache.org/repos/asf/solr.git

commit f00231c98de6890ca282de09fae6242fa9f35a67
Author: Noble Paul <no...@users.noreply.github.com>
AuthorDate: Fri Oct 14 05:59:30 2022 +1100

    SOLR-16460: ClusterState.copyWith is buggy (#1070)
---
 .../src/java/org/apache/solr/common/cloud/ClusterState.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
index 7d7e3c30a12..3a96b8b8dcd 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
@@ -83,7 +83,7 @@ public class ClusterState implements JSONWriter.Writable {
     this.liveNodes = new HashSet<>(liveNodes.size());
     this.liveNodes.addAll(liveNodes);
     this.collectionStates = new LinkedHashMap<>(collectionStates);
-    this.immutableCollectionStates = Collections.unmodifiableMap(collectionStates);
+    this.immutableCollectionStates = Collections.unmodifiableMap(this.collectionStates);
   }
 
   /**
@@ -94,13 +94,13 @@ public class ClusterState implements JSONWriter.Writable {
    * @return the updated cluster state which preserves the current live nodes
    */
   public ClusterState copyWith(String collectionName, DocCollection collection) {
-    ClusterState result = new ClusterState(new LinkedHashMap<>(collectionStates), liveNodes);
+    LinkedHashMap<String, CollectionRef> collections = new LinkedHashMap<>(collectionStates);
     if (collection == null) {
-      result.collectionStates.remove(collectionName);
+      collections.remove(collectionName);
     } else {
-      result.collectionStates.put(collectionName, new CollectionRef(collection));
+      collections.put(collectionName, new CollectionRef(collection));
     }
-    return result;
+    return new ClusterState(collections, liveNodes);
   }
 
   /**


[solr] 02/02: CHANGES.txt

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

noble pushed a commit to branch branch_9_1
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 6136a9191a87d0c35aaf3e9ee93dcf62fa4f5173
Author: Noble Paul <no...@gmail.com>
AuthorDate: Fri Oct 14 06:52:32 2022 +1100

    CHANGES.txt
---
 solr/CHANGES.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 61df4334ede..e79235da97e 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -155,6 +155,8 @@ Bug Fixes
 
 * SOLR-16433: Security Manager prevents Solr SQL from working (Kevin Risden)
 
+* SOLR-16460: ClusterState.copyWith is inconsistent (noble)
+
 Other Changes
 ---------------------
 * SOLR-16351: Upgrade Carrot2 to 4.4.3, upgrade randomizedtesting to 2.8.0. (Dawid Weiss)