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 2020/10/15 01:45:42 UTC

[lucene-solr] branch jira/solr-14930_8x created (now a81abed)

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

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


      at a81abed  SOLR-14930: Deprecate rulebased replica placement strategy

This branch includes the following new commits:

     new a81abed  SOLR-14930: Deprecate rulebased replica placement strategy

The 1 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/01: SOLR-14930: Deprecate rulebased replica placement strategy

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

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

commit a81abedd73d9b5d294398ea06a1162d5b723e635
Author: noblepaul <no...@gmail.com>
AuthorDate: Thu Oct 15 12:45:04 2020 +1100

    SOLR-14930: Deprecate rulebased replica placement strategy
---
 solr/CHANGES.txt                                                   | 2 ++
 solr/core/src/java/org/apache/solr/cloud/rule/ImplicitSnitch.java  | 4 ++++
 solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java | 3 +++
 solr/core/src/java/org/apache/solr/cloud/rule/Rule.java            | 4 +++-
 .../src/java/org/apache/solr/cloud/rule/ServerSnitchContext.java   | 3 +++
 solr/solr-ref-guide/src/rule-based-replica-placement.adoc          | 7 +++++++
 .../solrj/src/java/org/apache/solr/common/cloud/DocCollection.java | 7 +++++++
 7 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 235e12e..50fb4b0 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -16,6 +16,8 @@ Upgrade Notes
   Deprecations include: autoscaling policy, triggers, withCollection handling, simulation framework,
   autoscaling suggestions tab in the UI, autoAddReplicas and UTILIZENODE command.
 
+ * SOLR-14930: Rule based replica placement strategy is deprecated and will be replaced in
+    Solr 9.0 by APIs for replica placement and cluster events, with plugin-based implementations.
 
 New Features
 ---------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/rule/ImplicitSnitch.java b/solr/core/src/java/org/apache/solr/cloud/rule/ImplicitSnitch.java
index a4e998d..5166898 100644
--- a/solr/core/src/java/org/apache/solr/cloud/rule/ImplicitSnitch.java
+++ b/solr/core/src/java/org/apache/solr/cloud/rule/ImplicitSnitch.java
@@ -32,6 +32,10 @@ import static org.apache.solr.common.cloud.rule.ImplicitSnitch.DISK;
 import static org.apache.solr.common.cloud.rule.ImplicitSnitch.SYSPROP;
 
 //this is the server-side component which provides the tag values
+
+/** @deprecated to be removed in Solr 9.0 (see SOLR-14930)
+ *
+ */
 public class ImplicitSnitch implements CoreAdminHandler.Invocable {
 
   static long getUsableSpaceInGB(Path path) throws IOException {
diff --git a/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java b/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java
index f6679fb..63b2244 100644
--- a/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java
+++ b/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java
@@ -53,6 +53,9 @@ import static org.apache.solr.cloud.rule.Rule.Phase.FUZZY_VERIFY;
 import static org.apache.solr.cloud.rule.Rule.Phase.VERIFY;
 import static org.apache.solr.common.util.Utils.getDeepCopy;
 
+/** @deprecated to be removed in Solr 9.0 (see SOLR-14930)
+ *
+ */
 public class ReplicaAssigner {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   List<Rule> rules;
diff --git a/solr/core/src/java/org/apache/solr/cloud/rule/Rule.java b/solr/core/src/java/org/apache/solr/cloud/rule/Rule.java
index 95e197a..b0316c2 100644
--- a/solr/core/src/java/org/apache/solr/cloud/rule/Rule.java
+++ b/solr/core/src/java/org/apache/solr/cloud/rule/Rule.java
@@ -36,7 +36,9 @@ import static org.apache.solr.common.cloud.ZkStateReader.REPLICA_PROP;
 import static org.apache.solr.common.cloud.ZkStateReader.SHARD_ID_PROP;
 import static org.apache.solr.common.cloud.rule.ImplicitSnitch.CORES;
 
-
+/** @deprecated to be removed in Solr 9.0 (see SOLR-14930)
+ *
+ */
 public class Rule {
   public static final String WILD_CARD = "*";
   public static final String WILD_WILD_CARD = "**";
diff --git a/solr/core/src/java/org/apache/solr/cloud/rule/ServerSnitchContext.java b/solr/core/src/java/org/apache/solr/cloud/rule/ServerSnitchContext.java
index 9308342..db6a443 100644
--- a/solr/core/src/java/org/apache/solr/cloud/rule/ServerSnitchContext.java
+++ b/solr/core/src/java/org/apache/solr/cloud/rule/ServerSnitchContext.java
@@ -29,6 +29,9 @@ import org.apache.zookeeper.KeeperException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/** @deprecated to be removed in Solr 9.0 (see SOLR-14930)
+ *
+ */
 public class ServerSnitchContext extends SnitchContext {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
diff --git a/solr/solr-ref-guide/src/rule-based-replica-placement.adoc b/solr/solr-ref-guide/src/rule-based-replica-placement.adoc
index 34f990c..bcf581f 100644
--- a/solr/solr-ref-guide/src/rule-based-replica-placement.adoc
+++ b/solr/solr-ref-guide/src/rule-based-replica-placement.adoc
@@ -16,6 +16,13 @@
 // specific language governing permissions and limitations
 // under the License.
 
+[WARNING]
+.Rule-Based Replica Placement is deprecated
+====
+The autoscaling framework in its current form is deprecated and will be removed in Solr 9.0.
+A new design for this feature is currently under development in SOLR-14613 with a goal for release with Solr 9.0.
+====
+
 When Solr needs to assign nodes to collections, it can either automatically assign them randomly or the user can specify a set of nodes where it should create the replicas.
 
 With very large clusters, it is hard to specify exact node names and it still does not give you fine grained control over how nodes are chosen for a shard. The user should be in complete control of where the nodes are allocated for each collection, shard and replica. This helps to optimally allocate hardware resources across the cluster.
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
index 4c5d802..38bbeae 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
@@ -51,7 +51,14 @@ public class DocCollection extends ZkNodeProps implements Iterable<Slice> {
   public static final String DOC_ROUTER = "router";
   public static final String SHARDS = "shards";
   public static final String STATE_FORMAT = "stateFormat";
+  /** @deprecated to be removed in Solr 9.0 (see SOLR-14930)
+   *
+   */
   public static final String RULE = "rule";
+
+  /** @deprecated to be removed in Solr 9.0 (see SOLR-14930)
+   *
+   */
   public static final String SNITCH = "snitch";
 
   private final int znodeVersion;