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/01/22 02:55:54 UTC

[lucene-solr] branch jira/solr15094 created (now 21be96d)

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

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


      at 21be96d  SOLR-15094: Replace all code references of coreNodeName to replicaName

This branch includes the following new commits:

     new 21be96d  SOLR-15094: Replace all code references of coreNodeName to replicaName

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-15094: Replace all code references of coreNodeName to replicaName

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

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

commit 21be96d8134f40a10500af2cf082a14c2574bd50
Author: noblepaul <no...@gmail.com>
AuthorDate: Fri Jan 22 13:54:16 2021 +1100

    SOLR-15094: Replace all code references of coreNodeName to replicaName
---
 gradle/maven/defaults-maven.gradle                 |   1 +
 settings.gradle                                    |   1 +
 solr/CHANGES.txt                                   |   3 +
 .../org/apache/solr/cloud/CloudDescriptor.java     |  22 +-
 .../src/java/org/apache/solr/cloud/CloudUtil.java  |   6 +-
 .../org/apache/solr/cloud/ElectionContext.java     |   4 +-
 .../solr/cloud/RecoveringCoreTermWatcher.java      |  10 +-
 .../org/apache/solr/cloud/RecoveryStrategy.java    |   8 +-
 .../solr/cloud/ShardLeaderElectionContext.java     |  30 +-
 .../solr/cloud/ShardLeaderElectionContextBase.java |   4 +-
 .../java/org/apache/solr/cloud/SyncStrategy.java   |   4 +-
 .../org/apache/solr/cloud/ZkCollectionTerms.java   |   4 +-
 .../java/org/apache/solr/cloud/ZkController.java   | 134 +++---
 .../java/org/apache/solr/cloud/ZkShardTerms.java   |  62 +--
 .../solr/cloud/api/collections/AddReplicaCmd.java  |  27 +-
 .../apache/solr/cloud/api/collections/Assign.java  |  12 +-
 .../api/collections/LeaderRecoveryWatcher.java     |   2 +-
 .../solr/cloud/api/collections/MigrateCmd.java     |   8 +-
 .../OverseerCollectionMessageHandler.java          |   4 +-
 .../solr/cloud/api/collections/RestoreCmd.java     |   6 +-
 .../solr/cloud/api/collections/SplitShardCmd.java  |   4 +-
 .../solr/cloud/overseer/ClusterStateMutator.java   |   2 +-
 .../apache/solr/cloud/overseer/ReplicaMutator.java |  32 +-
 .../apache/solr/cloud/overseer/SliceMutator.java   |  12 +-
 .../src/java/org/apache/solr/core/CloudConfig.java |   2 +-
 .../java/org/apache/solr/core/CoreContainer.java   |   8 +-
 .../java/org/apache/solr/core/CoreDescriptor.java  |   8 +-
 .../org/apache/solr/core/HdfsDirectoryFactory.java |   2 +-
 .../java/org/apache/solr/handler/IndexFetcher.java |   2 +-
 .../solr/handler/admin/CoreAdminHandler.java       |   8 +-
 .../solr/handler/admin/CoreAdminOperation.java     |   2 +-
 .../apache/solr/handler/admin/PrepRecoveryOp.java  |  17 +-
 .../handler/component/RealTimeGetComponent.java    |   2 +-
 .../org/apache/solr/logging/MDCLoggingContext.java |   2 +-
 .../apache/solr/metrics/SolrCoreMetricManager.java |   4 +-
 .../metrics/reporters/solr/SolrShardReporter.java  |   4 +-
 .../org/apache/solr/schema/ManagedIndexSchema.java |  10 +-
 .../java/org/apache/solr/schema/SchemaManager.java |   2 +-
 .../processor/DistributedZkUpdateProcessor.java    |  74 +--
 .../DocExpirationUpdateProcessorFactory.java       |   4 +-
 .../update/processor/ScriptEngineCustomizer.java   |  28 --
 .../StatelessScriptUpdateProcessorFactory.java     | 529 ---------------------
 .../java/org/apache/solr/util/SolrLogLayout.java   |   2 +-
 .../collection1/conf/addfields.updateprocessor.js  |  26 -
 .../bad-solrconfig-bogus-scriptengine-name.xml     |  34 --
 .../conf/bad-solrconfig-invalid-scriptfile.xml     |  35 --
 .../conf/bad-solrconfig-missing-scriptfile.xml     |  33 --
 .../conf/conditional.updateprocessor.js            |  25 -
 .../solr/collection1/conf/cross-compatible.js      |  53 ---
 .../src/test-files/solr/collection1/conf/evil.js   |  21 -
 .../conf/missing.functions.updateprocessor.js      |   3 -
 .../missleading.extension.updateprocessor.js.txt   |  23 -
 .../conf/solrconfig-script-updateprocessor.xml     | 126 -----
 .../conf/throw.error.on.add.updateprocessor.js     |  21 -
 .../collection1/conf/trivial.updateprocessor0.js   |  59 ---
 .../collection1/conf/trivial.updateprocessor1.js   |  25 -
 .../missleading.extension.updateprocessor.js.txt   |  23 -
 .../upload/with-script-processor/solrconfig.xml    |  10 +-
 .../cloud/AssignBackwardCompatibilityTest.java     |   8 +-
 .../apache/solr/cloud/BasicDistributedZkTest.java  |   2 +-
 .../solr/cloud/DeleteInactiveReplicaTest.java      |   4 +-
 .../org/apache/solr/cloud/DeleteReplicaTest.java   |   2 +-
 .../DistribDocExpirationUpdateProcessorTest.java   |   2 +-
 .../org/apache/solr/cloud/HttpPartitionTest.java   |   6 +-
 .../solr/cloud/LeaderElectionContextKeyTest.java   |   2 +-
 .../org/apache/solr/cloud/LeaderElectionTest.java  |   4 +-
 .../cloud/LeaderFailureAfterFreshStartTest.java    |   6 +-
 .../test/org/apache/solr/cloud/OverseerTest.java   |  20 +-
 .../apache/solr/cloud/PeerSyncReplicationTest.java |   2 +-
 .../solr/cloud/TestCloudSearcherWarming.java       |  48 +-
 .../org/apache/solr/cloud/TestTlogReplica.java     |   4 +-
 .../org/apache/solr/cloud/ZkControllerTest.java    |   8 +-
 .../test/org/apache/solr/core/CoreSorterTest.java  |   3 +-
 .../test/org/apache/solr/core/TestBadConfig.java   |  30 +-
 .../solr/handler/admin/HealthCheckHandlerTest.java |   2 +-
 .../reporters/solr/SolrShardReporterTest.java      |   2 +-
 .../solr/update/processor/ScriptEngineTest.java    | 110 -----
 .../StatelessScriptUpdateProcessorFactoryTest.java | 272 -----------
 solr/packaging/build.gradle                        |   1 +
 .../conf/solrconfig.xml                            |  37 +-
 .../conf/update-script.js                          |   4 +-
 solr/solr-ref-guide/src/configsets-api.adoc        |   2 +-
 .../src/configuring-solrconfig-xml.adoc            |   1 +
 .../src/major-changes-in-solr-9.adoc               |   3 +
 .../src/update-request-processors.adoc             |   2 +-
 .../apache/solr/client/solrj/cloud/ShardTerms.java | 112 ++---
 .../client/solrj/request/CoreAdminRequest.java     |  28 +-
 .../apache/solr/common/cloud/ClusterStateUtil.java |  12 +-
 .../apache/solr/common/cloud/DocCollection.java    |   6 +-
 .../java/org/apache/solr/common/cloud/Replica.java |   2 +-
 .../java/org/apache/solr/common/cloud/Slice.java   |   2 +-
 .../apache/solr/common/cloud/ZkStateReader.java    |  20 +-
 .../apache/solr/common/params/CommonParams.java    |   2 +
 .../apache/solr/common/params/CoreAdminParams.java |   3 +-
 .../solrj/impl/CloudHttp2SolrClientTest.java       |   2 +-
 .../client/solrj/impl/CloudSolrClientTest.java     |   2 +-
 .../apache/solr/BaseDistributedSearchTestCase.java |   7 +-
 .../solr/cloud/AbstractDistribZkTestBase.java      |   8 +-
 .../solr/cloud/AbstractFullDistribZkTestBase.java  |   4 +-
 .../java/org/apache/solr/cloud/ChaosMonkey.java    |  12 +-
 .../update/processor/UpdateProcessorTestBase.java  |   4 +-
 101 files changed, 510 insertions(+), 1932 deletions(-)

diff --git a/gradle/maven/defaults-maven.gradle b/gradle/maven/defaults-maven.gradle
index 2662a69..443d690 100644
--- a/gradle/maven/defaults-maven.gradle
+++ b/gradle/maven/defaults-maven.gradle
@@ -66,6 +66,7 @@ configure(rootProject) {
         ":solr:contrib:langid",
         ":solr:contrib:jaegertracer-configurator",
         ":solr:contrib:prometheus-exporter",
+        ":solr:contrib:scripting",
         ":solr:test-framework",
     ]
 
diff --git a/settings.gradle b/settings.gradle
index be2c09c..494c710 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -65,6 +65,7 @@ include "solr:contrib:extraction"
 include "solr:contrib:langid"
 include "solr:contrib:jaegertracer-configurator"
 include "solr:contrib:prometheus-exporter"
+include "solr:contrib:scripting"
 include "solr:contrib:ltr"
 include "solr:webapp"
 include "solr:test-framework"
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 4ce0332..7a17a75 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -188,6 +188,9 @@ Other Changes
 
 * SOLR-14297: Replace commons-codec Base64 with JDK8 Base64 (Andras Salamon via Houston Putman)
 
+* SOLR-14067: StatelessScriptUpdateProcessorFactory moved to it's own /contrib/scripting/ package instead
+ of shipping as part of Solr due to security concerns.  Renamed to ScriptUpdateProcessorFactory for simpler name. (Eric Pugh)
+ 
 Bug Fixes
 ---------------------
 * SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
diff --git a/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java b/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java
index b00ca52..ffd004d 100644
--- a/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java
+++ b/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java
@@ -26,6 +26,8 @@ import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.common.util.PropertiesUtil;
 import org.apache.solr.core.CoreDescriptor;
 
+import static org.apache.solr.common.params.CommonParams.REPLICA_NAME;
+
 /**
  * SolrCloud metadata attached to a {@link CoreDescriptor}.
  */
@@ -64,7 +66,7 @@ public class CloudDescriptor {
     // If no collection name is specified, we default to the core name
     this.collectionName = props.getProperty(CoreDescriptor.CORE_COLLECTION, coreName);
     this.roles = props.getProperty(CoreDescriptor.CORE_ROLES, null);
-    this.nodeName = props.getProperty(CoreDescriptor.CORE_NODE_NAME);
+    this.nodeName = props.getProperty(REPLICA_NAME);
     if (Strings.isNullOrEmpty(nodeName))
       this.nodeName = null;
     this.numShards = PropertiesUtil.toInteger(props.getProperty(CloudDescriptor.NUM_SHARDS), null);
@@ -146,15 +148,27 @@ public class CloudDescriptor {
   public void setNumShards(int numShards) {
     this.numShards = numShards;
   }
-  
+
+  @Deprecated
   public String getCoreNodeName() {
     return nodeName;
   }
 
+  public String  getReplicaName() {
+    return nodeName;
+  }
+
+  public void  setReplicaName(String nodeName) {
+    this.nodeName = nodeName;
+    if(nodeName==null) cd.getPersistableStandardProperties().remove(REPLICA_NAME);
+    else cd.getPersistableStandardProperties().setProperty(REPLICA_NAME, nodeName);
+  }
+
+  @Deprecated
   public void setCoreNodeName(String nodeName) {
     this.nodeName = nodeName;
-    if(nodeName==null) cd.getPersistableStandardProperties().remove(CoreDescriptor.CORE_NODE_NAME);
-    else cd.getPersistableStandardProperties().setProperty(CoreDescriptor.CORE_NODE_NAME, nodeName);
+    if(nodeName==null) cd.getPersistableStandardProperties().remove(REPLICA_NAME);
+    else cd.getPersistableStandardProperties().setProperty(REPLICA_NAME, nodeName);
   }
 
   public void reload(CloudDescriptor reloadFrom) {
diff --git a/solr/core/src/java/org/apache/solr/cloud/CloudUtil.java b/solr/core/src/java/org/apache/solr/cloud/CloudUtil.java
index 3dffb72..2d6b798 100644
--- a/solr/core/src/java/org/apache/solr/cloud/CloudUtil.java
+++ b/solr/core/src/java/org/apache/solr/cloud/CloudUtil.java
@@ -56,7 +56,7 @@ public class CloudUtil {
   public static final int DEFAULT_TIMEOUT = 90;
 
   /**
-   * See if coreNodeName has been taken over by another baseUrl and unload core
+   * See if replicaName has been taken over by another baseUrl and unload core
    * + throw exception if it has been.
    */
   public static void checkSharedFSFailoverReplaced(CoreContainer cc, CoreDescriptor desc) {
@@ -103,12 +103,12 @@ public class CloudUtil {
     }
   }
 
-  public static boolean replicaExists(ClusterState clusterState, String collection, String shard, String coreNodeName) {
+  public static boolean replicaExists(ClusterState clusterState, String collection, String shard, String replicaName) {
     DocCollection docCollection = clusterState.getCollectionOrNull(collection);
     if (docCollection != null) {
       Slice slice = docCollection.getSlice(shard);
       if (slice != null) {
-        return slice.getReplica(coreNodeName) != null;
+        return slice.getReplica(replicaName) != null;
       }
     }
     return false;
diff --git a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
index 1398570..72e20b3 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
@@ -35,10 +35,10 @@ public abstract class ElectionContext implements Closeable {
   volatile String leaderSeqPath;
   private SolrZkClient zkClient;
 
-  public ElectionContext(final String coreNodeName,
+  public ElectionContext(final String relicaName,
       final String electionPath, final String leaderPath, final ZkNodeProps leaderProps, final SolrZkClient zkClient) {
     assert zkClient != null;
-    this.id = coreNodeName;
+    this.id = relicaName;
     this.electionPath = electionPath;
     this.leaderPath = leaderPath;
     this.leaderProps = leaderProps;
diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveringCoreTermWatcher.java b/solr/core/src/java/org/apache/solr/cloud/RecoveringCoreTermWatcher.java
index 1fa31ad..4ca95c8 100644
--- a/solr/core/src/java/org/apache/solr/cloud/RecoveringCoreTermWatcher.java
+++ b/solr/core/src/java/org/apache/solr/cloud/RecoveringCoreTermWatcher.java
@@ -54,11 +54,11 @@ public class RecoveringCoreTermWatcher implements ZkShardTerms.CoreTermWatcher {
       }
 
       if (solrCore.getCoreDescriptor() == null || solrCore.getCoreDescriptor().getCloudDescriptor() == null) return true;
-      String coreNodeName = solrCore.getCoreDescriptor().getCloudDescriptor().getCoreNodeName();
-      if (terms.haveHighestTermValue(coreNodeName)) return true;
-      if (lastTermDoRecovery.get() < terms.getTerm(coreNodeName)) {
-        log.info("Start recovery on {} because core's term is less than leader's term", coreNodeName);
-        lastTermDoRecovery.set(terms.getTerm(coreNodeName));
+      String replicaName = solrCore.getCoreDescriptor().getCloudDescriptor().getReplicaName();
+      if (terms.haveHighestTermValue(replicaName)) return true;
+      if (lastTermDoRecovery.get() < terms.getTerm(replicaName)) {
+        log.info("Start recovery on {} because core's term is less than leader's term", replicaName);
+        lastTermDoRecovery.set(terms.getTerm(replicaName));
         solrCore.getUpdateHandler().getSolrCoreState().doRecovery(solrCore.getCoreContainer(), solrCore.getCoreDescriptor());
       }
     } catch (Exception e) {
diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
index eaeba2d..4cc8b3f 100644
--- a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
+++ b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java
@@ -119,7 +119,7 @@ public class RecoveryStrategy implements Runnable, Closeable {
   private RecoveryListener recoveryListener;
   private ZkController zkController;
   private String baseUrl;
-  private String coreZkNodeName;
+  private String replicaName;
   private ZkStateReader zkStateReader;
   private volatile String coreName;
   private int retries;
@@ -137,7 +137,7 @@ public class RecoveryStrategy implements Runnable, Closeable {
     zkController = cc.getZkController();
     zkStateReader = zkController.getZkStateReader();
     baseUrl = zkController.getBaseUrl();
-    coreZkNodeName = cd.getCloudDescriptor().getCoreNodeName();
+    replicaName = cd.getCloudDescriptor().getCoreNodeName();
     replicaType = cd.getCloudDescriptor().getReplicaType();
   }
 
@@ -193,7 +193,7 @@ public class RecoveryStrategy implements Runnable, Closeable {
     if (prevSendPreRecoveryHttpUriRequest != null) {
       prevSendPreRecoveryHttpUriRequest.abort();
     }
-    log.warn("Stopping recovery for core=[{}] coreNodeName=[{}]", coreName, coreZkNodeName);
+    log.warn("Stopping recovery for core=[{}] replicaName=[{}]", coreName, replicaName);
   }
 
   final private void recoveryFailed(final ZkController zkController,
@@ -847,7 +847,7 @@ public class RecoveryStrategy implements Runnable, Closeable {
     WaitForState prepCmd = new WaitForState();
     prepCmd.setCoreName(leaderCoreName);
     prepCmd.setNodeName(zkController.getNodeName());
-    prepCmd.setCoreNodeName(coreZkNodeName);
+    prepCmd.setCoreNodeName(replicaName);
     prepCmd.setState(Replica.State.RECOVERING);
     prepCmd.setCheckLive(true);
     prepCmd.setOnlyIfLeader(true);
diff --git a/solr/core/src/java/org/apache/solr/cloud/ShardLeaderElectionContext.java b/solr/core/src/java/org/apache/solr/cloud/ShardLeaderElectionContext.java
index 68b062e..8fd74e2 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ShardLeaderElectionContext.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ShardLeaderElectionContext.java
@@ -56,8 +56,8 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase {
 
   public ShardLeaderElectionContext(LeaderElector leaderElector,
                                     final String shardId, final String collection,
-                                    final String coreNodeName, ZkNodeProps props, ZkController zkController, CoreContainer cc) {
-    super(leaderElector, shardId, collection, coreNodeName, props,
+                                    final String replicaName, ZkNodeProps props, ZkController zkController, CoreContainer cc) {
+    super(leaderElector, shardId, collection, replicaName, props,
         zkController);
     this.cc = cc;
     syncStrategy = new SyncStrategy(cc);
@@ -133,7 +133,7 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase {
       }
 
       Replica.Type replicaType;
-      String coreNodeName;
+      String replicaName;
       boolean setTermToMax = false;
       try (SolrCore core = cc.getCore(coreName)) {
 
@@ -142,11 +142,11 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase {
         }
 
         replicaType = core.getCoreDescriptor().getCloudDescriptor().getReplicaType();
-        coreNodeName = core.getCoreDescriptor().getCloudDescriptor().getCoreNodeName();
+        replicaName = core.getCoreDescriptor().getCloudDescriptor().getReplicaName();
         // should I be leader?
         ZkShardTerms zkShardTerms = zkController.getShardTerms(collection, shardId);
-        if (zkShardTerms.registered(coreNodeName) && !zkShardTerms.canBecomeLeader(coreNodeName)) {
-          if (!waitForEligibleBecomeLeaderAfterTimeout(zkShardTerms, coreNodeName, leaderVoteWait)) {
+        if (zkShardTerms.registered(replicaName) && !zkShardTerms.canBecomeLeader(replicaName)) {
+          if (!waitForEligibleBecomeLeaderAfterTimeout(zkShardTerms, replicaName, leaderVoteWait)) {
             rejoinLeaderElection(core);
             return;
           } else {
@@ -255,8 +255,8 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase {
           // in case of leaderVoteWait timeout, a replica with lower term can win the election
           if (setTermToMax) {
             log.error("WARNING: Potential data loss -- Replica {} became leader after timeout (leaderVoteWait) {}"
-                , "without being up-to-date with the previous leader", coreNodeName);
-            zkController.getShardTerms(collection, shardId).setTermEqualsToLeader(coreNodeName);
+                , "without being up-to-date with the previous leader", replicaName);
+            zkController.getShardTerms(collection, shardId).setTermEqualsToLeader(replicaName);
           }
           super.runLeaderProcess(weAreReplacement, 0);
           try (SolrCore core = cc.getCore(coreName)) {
@@ -314,15 +314,15 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase {
    * @return true if after {@code timeout} there are no other replicas with higher term participate in the election,
    * false if otherwise
    */
-  private boolean waitForEligibleBecomeLeaderAfterTimeout(ZkShardTerms zkShardTerms, String coreNodeName, int timeout) throws InterruptedException {
+  private boolean waitForEligibleBecomeLeaderAfterTimeout(ZkShardTerms zkShardTerms, String replicaName, int timeout) throws InterruptedException {
     long timeoutAt = System.nanoTime() + TimeUnit.NANOSECONDS.convert(timeout, TimeUnit.MILLISECONDS);
     while (!isClosed && !cc.isShutDown()) {
       if (System.nanoTime() > timeoutAt) {
         log.warn("After waiting for {}ms, no other potential leader was found, {} try to become leader anyway (core_term:{}, highest_term:{})",
-            timeout, coreNodeName, zkShardTerms.getTerm(coreNodeName), zkShardTerms.getHighestTerm());
+            timeout, replicaName, zkShardTerms.getTerm(replicaName), zkShardTerms.getHighestTerm());
         return true;
       }
-      if (replicasWithHigherTermParticipated(zkShardTerms, coreNodeName)) {
+      if (replicasWithHigherTermParticipated(zkShardTerms, replicaName)) {
         log.info("Can't become leader, other replicas with higher term participated in leader election");
         return false;
       }
@@ -336,17 +336,17 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase {
    *
    * @return true if other replicas with higher term participated in the election, false if otherwise
    */
-  private boolean replicasWithHigherTermParticipated(ZkShardTerms zkShardTerms, String coreNodeName) {
+  private boolean replicasWithHigherTermParticipated(ZkShardTerms zkShardTerms, String replicaName) {
     ClusterState clusterState = zkController.getClusterState();
     DocCollection docCollection = clusterState.getCollectionOrNull(collection);
     Slice slices = (docCollection == null) ? null : docCollection.getSlice(shardId);
     if (slices == null) return false;
 
-    long replicaTerm = zkShardTerms.getTerm(coreNodeName);
-    boolean isRecovering = zkShardTerms.isRecovering(coreNodeName);
+    long replicaTerm = zkShardTerms.getTerm(replicaName);
+    boolean isRecovering = zkShardTerms.isRecovering(replicaName);
 
     for (Replica replica : slices.getReplicas()) {
-      if (replica.getName().equals(coreNodeName)) continue;
+      if (replica.getName().equals(replicaName)) continue;
 
       if (clusterState.getLiveNodes().contains(replica.getNodeName())) {
         long otherTerm = zkShardTerms.getTerm(replica.getName());
diff --git a/solr/core/src/java/org/apache/solr/cloud/ShardLeaderElectionContextBase.java b/solr/core/src/java/org/apache/solr/cloud/ShardLeaderElectionContextBase.java
index 531294a..f58e0df 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ShardLeaderElectionContextBase.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ShardLeaderElectionContextBase.java
@@ -54,9 +54,9 @@ class ShardLeaderElectionContextBase extends ElectionContext {
   private final Object lock = new Object();
 
   public ShardLeaderElectionContextBase(LeaderElector leaderElector,
-                                        final String shardId, final String collection, final String coreNodeName,
+                                        final String shardId, final String collection, final String replicaName,
                                         ZkNodeProps props, ZkController zkController) {
-    super(coreNodeName, ZkStateReader.COLLECTIONS_ZKNODE + "/" + collection
+    super(replicaName, ZkStateReader.COLLECTIONS_ZKNODE + "/" + collection
         + "/leader_elect/" + shardId, ZkStateReader.getShardLeadersPath(
         collection, shardId), props, zkController.getZkClient());
     this.leaderElector = leaderElector;
diff --git a/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java b/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java
index c73e57b..bb23f33 100644
--- a/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java
+++ b/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java
@@ -155,7 +155,7 @@ public class SyncStrategy {
   private PeerSync.PeerSyncResult syncWithReplicas(ZkController zkController, SolrCore core,
       ZkNodeProps props, String collection, String shardId, boolean peerSyncOnlyWithActive) throws Exception {
     List<ZkCoreNodeProps> nodes = zkController.getZkStateReader()
-        .getReplicaProps(collection, shardId,core.getCoreDescriptor().getCloudDescriptor().getCoreNodeName());
+        .getReplicaProps(collection, shardId,core.getCoreDescriptor().getCloudDescriptor().getReplicaName());
     
     if (isClosed) {
       log.info("We have been closed, won't sync with replicas");
@@ -197,7 +197,7 @@ public class SyncStrategy {
     List<ZkCoreNodeProps> nodes = zkController
         .getZkStateReader()
         .getReplicaProps(collection, shardId,
-            cd.getCloudDescriptor().getCoreNodeName());
+            cd.getCloudDescriptor().getReplicaName());
     if (nodes == null) {
       if (log.isInfoEnabled()) {
         log.info("{} has no replicas", ZkCoreNodeProps.getCoreUrl(leaderProps));
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkCollectionTerms.java b/solr/core/src/java/org/apache/solr/cloud/ZkCollectionTerms.java
index 671bb469..99a9089 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkCollectionTerms.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkCollectionTerms.java
@@ -47,9 +47,9 @@ class ZkCollectionTerms implements AutoCloseable {
     }
   }
 
-  public void register(String shardId, String coreNodeName) {
+  public void register(String shardId, String replicaName) {
     synchronized (terms)  {
-      getShard(shardId).registerTerm(coreNodeName);
+      getShard(shardId).registerTerm(replicaName);
     }
   }
 
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index 0e573ad..f52d843 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -139,11 +139,11 @@ public class ZkController implements Closeable {
   static class ContextKey {
 
     private String collection;
-    private String coreNodeName;
+    private String replicaName;
 
-    public ContextKey(String collection, String coreNodeName) {
+    public ContextKey(String collection, String replicaName) {
       this.collection = collection;
-      this.coreNodeName = coreNodeName;
+      this.replicaName = replicaName;
     }
 
     @Override
@@ -153,7 +153,7 @@ public class ZkController implements Closeable {
       result = prime * result
           + ((collection == null) ? 0 : collection.hashCode());
       result = prime * result
-          + ((coreNodeName == null) ? 0 : coreNodeName.hashCode());
+          + ((replicaName == null) ? 0 : replicaName.hashCode());
       return result;
     }
 
@@ -166,15 +166,15 @@ public class ZkController implements Closeable {
       if (collection == null) {
         if (other.collection != null) return false;
       } else if (!collection.equals(other.collection)) return false;
-      if (coreNodeName == null) {
-        if (other.coreNodeName != null) return false;
-      } else if (!coreNodeName.equals(other.coreNodeName)) return false;
+      if (replicaName == null) {
+        if (other.replicaName != null) return false;
+      } else if (!replicaName.equals(other.replicaName)) return false;
       return true;
     }
 
     @Override
     public String toString() {
-      return collection + ':' + coreNodeName;
+      return collection + ':' + replicaName;
     }
   }
 
@@ -209,7 +209,7 @@ public class ZkController implements Closeable {
   private int leaderVoteWait;
   private int leaderConflictResolveWait;
 
-  private boolean genericCoreNodeNames;
+  private boolean genericReplicaNames;
 
   private int clientTimeout;
 
@@ -284,7 +284,7 @@ public class ZkController implements Closeable {
 
     this.cloudConfig = cloudConfig;
 
-    this.genericCoreNodeNames = cloudConfig.getGenericCoreNodeNames();
+    this.genericReplicaNames = cloudConfig.getGenericReplicaNames();
 
     // be forgiving and strip this off leading/trailing slashes
     // this allows us to support users specifying hostContext="/" in
@@ -554,10 +554,10 @@ public class ZkController implements Closeable {
           Thread.currentThread().interrupt();
         }
 
-        final String coreZkNodeName = descriptor.getCloudDescriptor().getCoreNodeName();
+        final String replicaName = descriptor.getCloudDescriptor().getReplicaName();
         try {
-          log.debug("calling waitForLeaderToSeeDownState for coreZkNodeName={} collection={} shard={}", new Object[]{coreZkNodeName, collection, slice});
-          waitForLeaderToSeeDownState(descriptor, coreZkNodeName);
+          log.debug("calling waitForLeaderToSeeDownState for replicaName={} collection={} shard={}", new Object[]{replicaName, collection, slice});
+          waitForLeaderToSeeDownState(descriptor, replicaName);
         } catch (Exception e) {
           log.warn("There was a problem while making a best effort to ensure the leader has seen us as down, this is not unexpected as Zookeeper has just reconnected after a session expiration", e);
           if (isClosed) {
@@ -584,9 +584,9 @@ public class ZkController implements Closeable {
   private ContextKey closeExistingElectionContext(CoreDescriptor cd) {
     // look for old context - if we find it, cancel it
     String collection = cd.getCloudDescriptor().getCollectionName();
-    final String coreNodeName = cd.getCloudDescriptor().getCoreNodeName();
+    final String replicaName = cd.getCloudDescriptor().getReplicaName();
 
-    ContextKey contextKey = new ContextKey(collection, coreNodeName);
+    ContextKey contextKey = new ContextKey(collection, replicaName);
     ElectionContext prevContext = electionContexts.get(contextKey);
 
     if (prevContext != null) {
@@ -709,7 +709,7 @@ public class ZkController implements Closeable {
     if (shard == null) return;
 
     // if this replica is not a leader, it will be put in recovery state by the leader
-    String leader = cd.getCloudDescriptor().getCoreNodeName();
+    String leader = cd.getCloudDescriptor().getReplicaName();
     if (shard.getReplica(leader) != shard.getLeader()) return;
 
     Set<String> liveNodes = getClusterState().getLiveNodes();
@@ -1041,7 +1041,7 @@ public class ZkController implements Closeable {
         boolean foundStates = true;
         for (CoreDescriptor coreDescriptor : cc.getCoreDescriptors()) {
           if (coreDescriptor.getCloudDescriptor().getCollectionName().equals(collectionWithLocalReplica))  {
-            Replica replica = collectionState.getReplica(coreDescriptor.getCloudDescriptor().getCoreNodeName());
+            Replica replica = collectionState.getReplica(coreDescriptor.getCloudDescriptor().getReplicaName());
             if (replica == null || replica.getState() != Replica.State.DOWN) {
               foundStates = false;
             }
@@ -1160,24 +1160,24 @@ public class ZkController implements Closeable {
       final CloudDescriptor cloudDesc = desc.getCloudDescriptor();
       final String collection = cloudDesc.getCollectionName();
       final String shardId = cloudDesc.getShardId();
-      final String coreZkNodeName = cloudDesc.getCoreNodeName();
-      assert coreZkNodeName != null : "we should have a coreNodeName by now";
+      final String replicaName = cloudDesc.getReplicaName();
+      assert replicaName != null : "we should have a replicaName by now";
 
       // check replica's existence in clusterstate first
       try {
         zkStateReader.waitForState(collection, 100, TimeUnit.MILLISECONDS,
-            (collectionState) -> getReplicaOrNull(collectionState, shardId, coreZkNodeName) != null);
+            (collectionState) -> getReplicaOrNull(collectionState, shardId, replicaName) != null);
       } catch (TimeoutException e) {
         throw new SolrException(ErrorCode.SERVER_ERROR, "Error registering SolrCore, timeout waiting for replica present in clusterstate");
       }
-      Replica replica = getReplicaOrNull(zkStateReader.getClusterState().getCollectionOrNull(collection), shardId, coreZkNodeName);
+      Replica replica = getReplicaOrNull(zkStateReader.getClusterState().getCollectionOrNull(collection), shardId, replicaName);
       if (replica == null) {
         throw new SolrException(ErrorCode.SERVER_ERROR, "Error registering SolrCore, replica is removed from clusterstate");
       }
 
 
       if (replica.getType() != Type.PULL) {
-        getCollectionTerms(collection).register(cloudDesc.getShardId(), coreZkNodeName);
+        getCollectionTerms(collection).register(cloudDesc.getShardId(), replicaName);
       }
 
       ZkShardTerms shardTerms = getShardTerms(collection, cloudDesc.getShardId());
@@ -1192,9 +1192,9 @@ public class ZkController implements Closeable {
           joinElection(desc, afterExpiration, joinAtHead);
         } else if (replica.getType() == Type.PULL) {
           if (joinAtHead) {
-            log.warn("Replica {} was designated as preferred leader but it's type is {}, It won't join election", coreZkNodeName, Type.PULL);
+            log.warn("Replica {} was designated as preferred leader but it's type is {}, It won't join election", replicaName, Type.PULL);
           }
-          log.debug("Replica {} skipping election because it's type is {}", coreZkNodeName, Type.PULL);
+          log.debug("Replica {} skipping election because it's type is {}", replicaName, Type.PULL);
           startReplicationFromLeader(coreName, false);
         }
       } catch (InterruptedException e) {
@@ -1255,7 +1255,7 @@ public class ZkController implements Closeable {
           }
         }
         boolean didRecovery
-            = checkRecovery(recoverReloadedCores, isLeader, skipRecovery, collection, coreZkNodeName, shardId, core, cc, afterExpiration);
+            = checkRecovery(recoverReloadedCores, isLeader, skipRecovery, collection, replicaName, shardId, core, cc, afterExpiration);
         if (!didRecovery) {
           if (isTlogReplicaAndNotLeader) {
             startReplicationFromLeader(coreName, true);
@@ -1277,20 +1277,20 @@ public class ZkController implements Closeable {
       zkStateReader.forceUpdateCollection(collection);
       // the watcher is added to a set so multiple calls of this method will left only one watcher
       zkStateReader.registerDocCollectionWatcher(cloudDesc.getCollectionName(),
-          new UnloadCoreOnDeletedWatcher(coreZkNodeName, shardId, desc.getName()));
+          new UnloadCoreOnDeletedWatcher(replicaName, shardId, desc.getName()));
       return shardId;
     } finally {
       MDCLoggingContext.clear();
     }
   }
 
-  private Replica getReplicaOrNull(DocCollection docCollection, String shard, String coreNodeName) {
+  private Replica getReplicaOrNull(DocCollection docCollection, String shard, String replicaName) {
     if (docCollection == null) return null;
 
     Slice slice = docCollection.getSlice(shard);
     if (slice == null) return null;
 
-    Replica replica = slice.getReplica(coreNodeName);
+    Replica replica = slice.getReplica(replicaName);
     if (replica == null) return null;
     if (!getNodeName().equals(replica.getNodeName())) return null;
 
@@ -1422,9 +1422,9 @@ public class ZkController implements Closeable {
       throws InterruptedException, KeeperException, IOException {
     // look for old context - if we find it, cancel it
     String collection = cd.getCloudDescriptor().getCollectionName();
-    final String coreNodeName = cd.getCloudDescriptor().getCoreNodeName();
+    final String replicaName = cd.getCloudDescriptor().getCoreNodeName();
 
-    ContextKey contextKey = new ContextKey(collection, coreNodeName);
+    ContextKey contextKey = new ContextKey(collection, replicaName);
 
     ElectionContext prevContext = electionContexts.get(contextKey);
 
@@ -1438,14 +1438,14 @@ public class ZkController implements Closeable {
     // we only put a subset of props into the leader node
     props.put(ZkStateReader.CORE_NAME_PROP, cd.getName());
     props.put(ZkStateReader.NODE_NAME_PROP, getNodeName());
-    props.put(ZkStateReader.CORE_NODE_NAME_PROP, coreNodeName);
+    props.put(ZkStateReader.CORE_NODE_NAME_PROP, replicaName);
 
 
     ZkNodeProps ourProps = new ZkNodeProps(props);
 
     LeaderElector leaderElector = new LeaderElector(zkClient, contextKey, electionContexts);
     ElectionContext context = new ShardLeaderElectionContext(leaderElector, shardId,
-        collection, coreNodeName, ourProps, this, cc);
+        collection, replicaName, ourProps, this, cc);
 
     leaderElector.setup(context);
     electionContexts.put(contextKey, context);
@@ -1529,7 +1529,7 @@ public class ZkController implements Closeable {
 
       String shardId = cd.getCloudDescriptor().getShardId();
 
-      String coreNodeName = cd.getCloudDescriptor().getCoreNodeName();
+      String replicaName = cd.getCloudDescriptor().getReplicaName();
 
       Map<String,Object> props = new HashMap<>();
       props.put(Overseer.QUEUE_OPERATION, "state");
@@ -1544,8 +1544,8 @@ public class ZkController implements Closeable {
       if (numShards != null) {
         props.put(ZkStateReader.NUM_SHARDS_PROP, numShards.toString());
       }
-      if (coreNodeName != null) {
-        props.put(ZkStateReader.CORE_NODE_NAME_PROP, coreNodeName);
+      if (replicaName != null) {
+        props.put(CommonParams.REPLICA_NAME, replicaName);
       }
       try (SolrCore core = cc.getCore(cd.getName())) {
         if (core != null && state == Replica.State.ACTIVE) {
@@ -1572,10 +1572,10 @@ public class ZkController implements Closeable {
       if (state == Replica.State.RECOVERING && cd.getCloudDescriptor().getReplicaType() != Type.PULL) {
         // state is used by client, state of replica can change from RECOVERING to DOWN without needed to finish recovery
         // by calling this we will know that a replica actually finished recovery or not
-        getShardTerms(collection, shardId).startRecovering(coreNodeName);
+        getShardTerms(collection, shardId).startRecovering(replicaName);
       }
       if (state == Replica.State.ACTIVE && cd.getCloudDescriptor().getReplicaType() != Type.PULL) {
-        getShardTerms(collection, shardId).doneRecovering(coreNodeName);
+        getShardTerms(collection, shardId).doneRecovering(replicaName);
       }
 
       ZkNodeProps m = new ZkNodeProps(props);
@@ -1584,14 +1584,14 @@ public class ZkController implements Closeable {
         cd.getCloudDescriptor().setLastPublished(state);
       }
       DocCollection coll = zkStateReader.getCollection(collection);
-      if (forcePublish || sendToOverseer(coll, coreNodeName)) {
+      if (forcePublish || sendToOverseer(coll, replicaName)) {
         overseerJobQueue.offer(Utils.toJSON(m));
       } else {
         if (log.isDebugEnabled()) {
           log.debug("bypassed overseer for message : {}", Utils.toJSONString(m));
         }
         PerReplicaStates perReplicaStates = PerReplicaStates.fetch(coll.getZNode(), zkClient, coll.getPerReplicaStates());
-        PerReplicaStatesOps.flipState(coreNodeName, state, perReplicaStates)
+        PerReplicaStatesOps.flipState(replicaName, state, perReplicaStates)
             .persist(coll.getZNode(), zkClient);
       }
     } finally {
@@ -1640,10 +1640,10 @@ public class ZkController implements Closeable {
   }
 
   public void unregister(String coreName, CoreDescriptor cd, boolean removeCoreFromZk) throws Exception {
-    final String coreNodeName = cd.getCloudDescriptor().getCoreNodeName();
+    final String replicaName = cd.getCloudDescriptor().getReplicaName();
     final String collection = cd.getCloudDescriptor().getCollectionName();
     getCollectionTerms(collection).remove(cd.getCloudDescriptor().getShardId(), cd);
-    replicasMetTragicEvent.remove(collection+":"+coreNodeName);
+    replicasMetTragicEvent.remove(collection+":"+replicaName);
 
     if (Strings.isNullOrEmpty(collection)) {
       log.error("No collection was specified.");
@@ -1651,10 +1651,10 @@ public class ZkController implements Closeable {
       return;
     }
     final DocCollection docCollection = zkStateReader.getClusterState().getCollectionOrNull(collection);
-    Replica replica = (docCollection == null) ? null : docCollection.getReplica(coreNodeName);
+    Replica replica = (docCollection == null) ? null : docCollection.getReplica(replicaName);
 
     if (replica == null || replica.getType() != Type.PULL) {
-      ElectionContext context = electionContexts.remove(new ContextKey(collection, coreNodeName));
+      ElectionContext context = electionContexts.remove(new ContextKey(collection, replicaName));
 
       if (context != null) {
         context.cancelElection();
@@ -1666,7 +1666,7 @@ public class ZkController implements Closeable {
           OverseerAction.DELETECORE.toLower(), ZkStateReader.CORE_NAME_PROP, coreName,
           ZkStateReader.NODE_NAME_PROP, getNodeName(),
           ZkStateReader.COLLECTION_PROP, cloudDescriptor.getCollectionName(),
-          ZkStateReader.CORE_NODE_NAME_PROP, coreNodeName);
+          ZkStateReader.CORE_NODE_NAME_PROP, replicaName);
       overseerJobQueue.offer(Utils.toJSON(m));
     }
   }
@@ -1683,18 +1683,18 @@ public class ZkController implements Closeable {
   }
 
   private void doGetShardIdAndNodeNameProcess(CoreDescriptor cd) {
-    final String coreNodeName = cd.getCloudDescriptor().getCoreNodeName();
+    final String replicaName = cd.getCloudDescriptor().getReplicaName();
 
-    if (coreNodeName != null) {
+    if (replicaName != null) {
       waitForShardId(cd);
     } else {
-      // if no explicit coreNodeName, we want to match by base url and core name
-      waitForCoreNodeName(cd);
+      // if no explicit replicaName, we want to match by base url and core name
+      waitForReplica(cd);
       waitForShardId(cd);
     }
   }
 
-  private void waitForCoreNodeName(CoreDescriptor descriptor) {
+  private void waitForReplica(CoreDescriptor descriptor) {
     int retryCount = 320;
     log.debug("look for our core node name");
     while (retryCount-- > 0) {
@@ -1714,7 +1714,7 @@ public class ZkController implements Closeable {
 
             if (msgNodeName.equals(nodeName) && core.equals(msgCore)) {
               descriptor.getCloudDescriptor()
-                  .setCoreNodeName(replica.getName());
+                  .setReplicaName(replica.getName());
               getCoreContainer().getCoresLocator().persist(getCoreContainer(), descriptor);
               return;
             }
@@ -1751,20 +1751,24 @@ public class ZkController implements Closeable {
         "Could not get shard id for core: " + cd.getName());
   }
 
-
-  public String getCoreNodeName(CoreDescriptor descriptor) {
-    String coreNodeName = descriptor.getCloudDescriptor().getCoreNodeName();
-    if (coreNodeName == null && !genericCoreNodeNames) {
+  public String getReplicaName(CoreDescriptor descriptor) {
+    String replicaName = descriptor.getCloudDescriptor().getReplicaName();
+    if (replicaName == null && !genericReplicaNames) {
       // it's the default
       return getNodeName() + "_" + descriptor.getName();
     }
+    return replicaName;
+  }
 
-    return coreNodeName;
+
+  @Deprecated
+  public String getCoreNodeName(CoreDescriptor descriptor) {
+    return getReplicaName(descriptor);
   }
 
   public void preRegister(CoreDescriptor cd, boolean publishState) {
 
-    String coreNodeName = getCoreNodeName(cd);
+    String replicaName = getReplicaName(cd);
 
     // before becoming available, make sure we are not live and active
     // this also gets us our assigned shard id if it was not specified
@@ -1774,8 +1778,8 @@ public class ZkController implements Closeable {
       CloudDescriptor cloudDesc = cd.getCloudDescriptor();
 
       // make sure the node name is set on the descriptor
-      if (cloudDesc.getCoreNodeName() == null) {
-        cloudDesc.setCoreNodeName(coreNodeName);
+      if (cloudDesc.getReplicaName() == null) {
+        cloudDesc.setReplicaName(replicaName);
       }
 
       // publishState == false on startup
@@ -1823,11 +1827,11 @@ public class ZkController implements Closeable {
 
   private void checkStateInZk(CoreDescriptor cd) throws InterruptedException, NotInClusterStateException {
     CloudDescriptor cloudDesc = cd.getCloudDescriptor();
-    String nodeName = cloudDesc.getCoreNodeName();
+    String nodeName = cloudDesc.getReplicaName();
     if (nodeName == null) {
-      throw new SolrException(ErrorCode.SERVER_ERROR, "No coreNodeName for " + cd);
+      throw new SolrException(ErrorCode.SERVER_ERROR, "No replicaName for " + cd);
     }
-    final String coreNodeName = nodeName;
+    final String replicaName = nodeName;
 
     if (cloudDesc.getShardId() == null) {
       throw new SolrException(ErrorCode.SERVER_ERROR, "No shard id for " + cd);
@@ -1845,9 +1849,9 @@ public class ZkController implements Closeable {
           errorMessage.set("Invalid shard: " + cloudDesc.getShardId());
           return false;
         }
-        Replica replica = slice.getReplica(coreNodeName);
+        Replica replica = slice.getReplica(replicaName);
         if (replica == null) {
-          errorMessage.set("coreNodeName " + coreNodeName + " does not exist in shard " + cloudDesc.getShardId() +
+          errorMessage.set("replicaName " + replicaName + " does not exist in shard " + cloudDesc.getShardId() +
               ", ignore the exception if the replica was deleted");
           return false;
         }
@@ -1856,7 +1860,7 @@ public class ZkController implements Closeable {
     } catch (TimeoutException e) {
       String error = errorMessage.get();
       if (error == null)
-        error = "coreNodeName " + coreNodeName + " does not exist in shard " + cloudDesc.getShardId() +
+        error = "replicaName " + replicaName + " does not exist in shard " + cloudDesc.getShardId() +
             ", ignore the exception if the replica was deleted";
       throw new NotInClusterStateException(ErrorCode.SERVER_ERROR, error);
     }
@@ -2636,7 +2640,7 @@ public class ZkController implements Closeable {
     }
   }
 
-  public boolean checkIfCoreNodeNameAlreadyExists(CoreDescriptor dcore) {
+  public boolean checkIfReplicaNameAlreadyExists(CoreDescriptor dcore) {
     DocCollection collection = zkStateReader.getClusterState().getCollectionOrNull(dcore.getCollectionName());
     if (collection != null) {
       Collection<Slice> slices = collection.getSlices();
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java b/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
index 6b4799f..a55ed25 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
@@ -110,7 +110,7 @@ public class ZkShardTerms implements AutoCloseable{
    * Ensure that terms are higher than some replica's terms. If the current leader is attempting to give up
    * leadership and included in replicasNeedingRecovery, then other replicas that are in sync will have higher
    * terms, while the leader will stay where it is.
-   * @param leader coreNodeName of leader
+   * @param leader replicaName of leader
    * @param replicasNeedingRecovery set of replicas in which their terms should be lower than leader's term
    */
   public void ensureTermsIsHigher(String leader, Set<String> replicasNeedingRecovery) {
@@ -123,29 +123,29 @@ public class ZkShardTerms implements AutoCloseable{
   }
   /**
    * Can this replica become leader?
-   * @param coreNodeName of the replica
+   * @param replicaName of the replica
    * @return true if this replica can become leader, false if otherwise
    */
-  public boolean canBecomeLeader(String coreNodeName) {
-    return terms.get().canBecomeLeader(coreNodeName);
+  public boolean canBecomeLeader(String replicaName) {
+    return terms.get().canBecomeLeader(replicaName);
   }
 
   /**
    * Should leader skip sending updates to this replica?
-   * @param coreNodeName of the replica
+   * @param replicaName of the replica
    * @return true if this replica has term equals to leader's term, false if otherwise
    */
-  public boolean skipSendingUpdatesTo(String coreNodeName) {
-    return !terms.get().haveHighestTermValue(coreNodeName);
+  public boolean skipSendingUpdatesTo(String replicaName) {
+    return !terms.get().haveHighestTermValue(replicaName);
   }
 
   /**
    * Did this replica registered its term? This is a sign to check f
-   * @param coreNodeName of the replica
+   * @param replicaName of the replica
    * @return true if this replica registered its term, false if otherwise
    */
-  public boolean registered(String coreNodeName) {
-    return terms.get().getTerm(coreNodeName) != null;
+  public boolean registered(String replicaName) {
+    return terms.get().getTerm(replicaName) != null;
   }
 
   public void close() {
@@ -172,7 +172,7 @@ public class ZkShardTerms implements AutoCloseable{
   }
 
   /**
-   * Remove the coreNodeName from terms map and also remove any expired listeners
+   * Remove the replicaName from terms map and also remove any expired listeners
    * @return Return true if this object should not be reused
    */
   boolean removeTerm(CoreDescriptor cd) {
@@ -182,14 +182,14 @@ public class ZkShardTerms implements AutoCloseable{
       listeners.removeIf(coreTermWatcher -> !coreTermWatcher.onTermChanged(terms.get()));
       numListeners = listeners.size();
     }
-    return removeTerm(cd.getCloudDescriptor().getCoreNodeName()) || numListeners == 0;
+    return removeTerm(cd.getCloudDescriptor().getReplicaName()) || numListeners == 0;
   }
 
   // package private for testing, only used by tests
   // return true if this object should not be reused
-  boolean removeTerm(String coreNodeName) {
+  boolean removeTerm(String replicaName) {
     ShardTerms newTerms;
-    while ( (newTerms = terms.get().removeTerm(coreNodeName)) != null) {
+    while ( (newTerms = terms.get().removeTerm(replicaName)) != null) {
       try {
         if (saveTerms(newTerms, "removeTerm")) return false;
       } catch (KeeperException.NoNodeException e) {
@@ -202,41 +202,41 @@ public class ZkShardTerms implements AutoCloseable{
   /**
    * Register a replica's term (term value will be 0).
    * If a term is already associate with this replica do nothing
-   * @param coreNodeName of the replica
+   * @param replicaName of the replica
    */
-  void registerTerm(String coreNodeName) {
-    mutate(terms -> terms.registerTerm(coreNodeName));
+  void registerTerm(String replicaName) {
+    mutate(terms -> terms.registerTerm(replicaName));
   }
 
   /**
    * Set a replica's term equals to leader's term, and remove recovering flag of a replica.
    * This call should only be used by {@link org.apache.solr.common.params.CollectionParams.CollectionAction#FORCELEADER}
-   * @param coreNodeName of the replica
+   * @param replicaName of the replica
    */
-  public void setTermEqualsToLeader(String coreNodeName) {
-    mutate(terms -> terms.setTermEqualsToLeader(coreNodeName));
+  public void setTermEqualsToLeader(String replicaName) {
+    mutate(terms -> terms.setTermEqualsToLeader(replicaName));
   }
 
   /**
    * Set a replica's term to 0. If the term does not exist, create it.
-   * @param coreNodeName of the replica
+   * @param replicaName of the replica
    */
-  public void setTermToZero(String coreNodeName) {
-    mutate(terms -> terms.setTermToZero(coreNodeName));
+  public void setTermToZero(String replicaName) {
+    mutate(terms -> terms.setTermToZero(replicaName));
   }
 
   /**
-   * Mark {@code coreNodeName} as recovering
+   * Mark {@code replicaName} as recovering
    */
-  public void startRecovering(String coreNodeName) {
-    mutate(terms -> terms.startRecovering(coreNodeName));
+  public void startRecovering(String replicaName) {
+    mutate(terms -> terms.startRecovering(replicaName));
   }
 
   /**
-   * Mark {@code coreNodeName} as finished recovering
+   * Mark {@code replicaName} as finished recovering
    */
-  public void doneRecovering(String coreNodeName) {
-    mutate(terms -> terms.doneRecovering(coreNodeName));
+  public void doneRecovering(String replicaName) {
+    mutate(terms -> terms.doneRecovering(replicaName));
   }
 
   public boolean isRecovering(String name) {
@@ -269,8 +269,8 @@ public class ZkShardTerms implements AutoCloseable{
     return terms.get().getMaxTerm();
   }
 
-  public long getTerm(String coreNodeName) {
-    Long term = terms.get().getTerm(coreNodeName);
+  public long getTerm(String replicaName) {
+    Long term = terms.get().getTerm(replicaName);
     return term == null? -1 : term;
   }
 
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java
index b24e442..a1b7756 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java
@@ -55,10 +55,7 @@ import org.apache.solr.common.cloud.ReplicaPosition;
 import org.apache.solr.common.cloud.Slice;
 import org.apache.solr.common.cloud.ZkNodeProps;
 import org.apache.solr.common.cloud.ZkStateReader;
-import org.apache.solr.common.params.CollectionAdminParams;
-import org.apache.solr.common.params.CoreAdminParams;
-import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.common.params.ShardParams;
+import org.apache.solr.common.params.*;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.handler.component.ShardHandler;
@@ -135,7 +132,7 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
       if (node != null) {
         throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Cannot create " + totalReplicas + " replicas if 'name' parameter is specified");
       }
-      if (message.getStr(CoreAdminParams.CORE_NODE_NAME) != null) {
+      if (message.getStr(CommonParams.REPLICA_NAME) != null) {
         throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Cannot create " + totalReplicas + " replicas if 'coreNodeName' parameter is specified");
       }
     }
@@ -160,7 +157,7 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
     Runnable runnable = () -> {
       shardRequestTracker.processResponses(results, shardHandler, true, "ADDREPLICA failed to create replica");
       for (CreateReplica replica : createReplicas) {
-        ocmh.waitForCoreNodeName(collectionName, replica.node, replica.coreName);
+        ocmh.waitForReplica(collectionName, replica.node, replica.coreName);
       }
       if (onComplete != null) onComplete.run();
     };
@@ -209,8 +206,8 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
           ZkStateReader.STATE_PROP, Replica.State.DOWN.toString(),
           ZkStateReader.NODE_NAME_PROP, createReplica.node,
           ZkStateReader.REPLICA_TYPE, createReplica.replicaType.name());
-      if (createReplica.coreNodeName != null) {
-        props = props.plus(ZkStateReader.CORE_NODE_NAME_PROP, createReplica.coreNodeName);
+      if (createReplica.replicaName != null) {
+        props = props.plus(ZkStateReader.CORE_NODE_NAME_PROP, createReplica.replicaName);
       }
       try {
         ocmh.overseer.offerStateUpdate(Utils.toJSON(props));
@@ -253,8 +250,8 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
     if (instanceDir != null) {
       params.set(CoreAdminParams.INSTANCE_DIR, instanceDir);
     }
-    if (createReplica.coreNodeName != null) {
-      params.set(CoreAdminParams.CORE_NODE_NAME, createReplica.coreNodeName);
+    if (createReplica.replicaName != null) {
+      params.set(CoreAdminParams.CORE_NODE_NAME, createReplica.replicaName);
     }
     ocmh.addPropertyParams(message, params);
 
@@ -269,7 +266,7 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
     String node = replicaPosition.node;
     String shard = message.getStr(SHARD_ID_PROP);
     String coreName = message.getStr(CoreAdminParams.NAME);
-    String coreNodeName = message.getStr(CoreAdminParams.CORE_NODE_NAME);
+    String replicaName = message.getStr(CoreAdminParams.CORE_NODE_NAME);
     Replica.Type replicaType = replicaPosition.type;
 
     if (StringUtils.isBlank(coreName)) {
@@ -296,7 +293,7 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
       }
     }
     log.info("Returning CreateReplica command.");
-    return new CreateReplica(collection, shard, node, replicaType, coreName, coreNodeName);
+    return new CreateReplica(collection, shard, node, replicaType, coreName, replicaName);
   }
 
   public static List<ReplicaPosition> buildReplicaPositions(SolrCloudManager cloudManager, ClusterState clusterState,
@@ -361,15 +358,15 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
     public final String node;
     public final Replica.Type replicaType;
     public String coreName;
-    public String coreNodeName;
+    public String replicaName;
 
-    CreateReplica(String collectionName, String sliceName, String node, Replica.Type replicaType, String coreName, String coreNodeName) {
+    CreateReplica(String collectionName, String sliceName, String node, Replica.Type replicaType, String coreName, String replicaName) {
       this.collectionName = collectionName;
       this.sliceName = sliceName;
       this.node = node;
       this.replicaType = replicaType;
       this.coreName = coreName;
-      this.coreNodeName = coreNodeName;
+      this.replicaName = replicaName;
     }
   }
 
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java
index 786bfa9..01d4ec1 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java
@@ -114,16 +114,16 @@ public class Assign {
     }
   }
 
-  public static String assignCoreNodeName(DistribStateManager stateManager, DocCollection collection) {
+  public static String assignReplicaName(DistribStateManager stateManager, DocCollection collection) {
     // for backward compatibility;
     int defaultValue = defaultCounterValue(collection, false);
-    String coreNodeName = "core_node" + incAndGetId(stateManager, collection.getName(), defaultValue);
-    while (collection.getReplica(coreNodeName) != null) {
-      // there is wee chance that, the new coreNodeName id not totally unique,
+    String replicaName = "core_node" + incAndGetId(stateManager, collection.getName(), defaultValue);
+    while (collection.getReplica(replicaName) != null) {
+      // there is wee chance that, the new replicaName is not totally unique,
       // but this will be guaranteed unique for new collections
-      coreNodeName = "core_node" + incAndGetId(stateManager, collection.getName(), defaultValue);
+      replicaName = "core_node" + incAndGetId(stateManager, collection.getName(), defaultValue);
     }
-    return coreNodeName;
+    return replicaName;
   }
 
   /**
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/LeaderRecoveryWatcher.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/LeaderRecoveryWatcher.java
index a80fdc0..1f3fbc3 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/LeaderRecoveryWatcher.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/LeaderRecoveryWatcher.java
@@ -40,7 +40,7 @@ public class LeaderRecoveryWatcher implements CollectionStateWatcher {
    *
    * @param collectionId   collection name
    * @param shardId        shard id
-   * @param replicaId      source replica name (coreNodeName)
+   * @param replicaId      source replica name
    * @param targetCore     specific target core name - if null then any active replica will do
    * @param latch countdown when recovered
    */
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/MigrateCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/MigrateCmd.java
index 85bac4b..20ec262 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/MigrateCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/MigrateCmd.java
@@ -251,7 +251,7 @@ public class MigrateCmd implements OverseerCollectionMessageHandler.Cmd {
     Replica tempSourceLeader = zkStateReader.getLeaderRetry(tempSourceCollectionName, tempSourceSlice.getName(), 120000);
 
     String tempCollectionReplica1 = tempSourceLeader.getCoreName();
-    String coreNodeName = ocmh.waitForCoreNodeName(tempSourceCollectionName,
+    String replicaName = ocmh.waitForReplica(tempSourceCollectionName,
         sourceLeader.getNodeName(), tempCollectionReplica1);
     // wait for the replicas to be seen as active on temp source leader
     if (log.isInfoEnabled()) {
@@ -260,7 +260,7 @@ public class MigrateCmd implements OverseerCollectionMessageHandler.Cmd {
     CoreAdminRequest.WaitForState cmd = new CoreAdminRequest.WaitForState();
     cmd.setCoreName(tempCollectionReplica1);
     cmd.setNodeName(sourceLeader.getNodeName());
-    cmd.setCoreNodeName(coreNodeName);
+    cmd.setReplicaName(replicaName);
     cmd.setState(Replica.State.ACTIVE);
     cmd.setCheckLive(true);
     cmd.setOnlyIfLeader(true);
@@ -319,7 +319,7 @@ public class MigrateCmd implements OverseerCollectionMessageHandler.Cmd {
       syncRequestTracker.processResponses(results, shardHandler, true, "MIGRATE failed to create replica of " +
         "temporary collection in target leader node.");
     }
-    coreNodeName = ocmh.waitForCoreNodeName(tempSourceCollectionName,
+    replicaName = ocmh.waitForReplica(tempSourceCollectionName,
         targetLeader.getNodeName(), tempCollectionReplica2);
     // wait for the replicas to be seen as active on temp source leader
     if (log.isInfoEnabled()) {
@@ -328,7 +328,7 @@ public class MigrateCmd implements OverseerCollectionMessageHandler.Cmd {
     cmd = new CoreAdminRequest.WaitForState();
     cmd.setCoreName(tempSourceLeader.getStr("core"));
     cmd.setNodeName(targetLeader.getNodeName());
-    cmd.setCoreNodeName(coreNodeName);
+    cmd.setCoreNodeName(replicaName);
     cmd.setState(Replica.State.ACTIVE);
     cmd.setCheckLive(true);
     cmd.setOnlyIfLeader(true);
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java
index b69d4d4..8c55fd3 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java
@@ -488,7 +488,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler,
     }
   }
 
-  String waitForCoreNodeName(String collectionName, String msgNodeName, String msgCore) {
+  String waitForReplica(String collectionName, String msgNodeName, String msgCore) {
     int retryCount = 320;
     while (retryCount-- > 0) {
       final DocCollection docCollection = zkStateReader.getClusterState().getCollectionOrNull(collectionName);
@@ -513,7 +513,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler,
         Thread.currentThread().interrupt();
       }
     }
-    throw new SolrException(ErrorCode.SERVER_ERROR, "Could not find coreNodeName");
+    throw new SolrException(ErrorCode.SERVER_ERROR, "Could not find replicaName");
   }
 
   ClusterState waitForNewShard(String collectionName, String sliceName) throws KeeperException, InterruptedException {
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
index c7c941a..0b6dffc 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
@@ -327,17 +327,17 @@ public class RestoreCmd implements OverseerCollectionMessageHandler.Cmd {
       for (Slice s : restoreCollection.getSlices()) {
         for (Replica r : s.getReplicas()) {
           String nodeName = r.getNodeName();
-          String coreNodeName = r.getCoreName();
+          String replicaName = r.getCoreName();
           Replica.State stateRep = r.getState();
 
           if (log.isDebugEnabled()) {
-            log.debug("Calling REQUESTAPPLYUPDATES on: nodeName={}, coreNodeName={}, state={}", nodeName, coreNodeName,
+            log.debug("Calling REQUESTAPPLYUPDATES on: nodeName={}, replicaName={}, state={}", nodeName, replicaName,
                     stateRep.name());
           }
 
           ModifiableSolrParams params = new ModifiableSolrParams();
           params.set(CoreAdminParams.ACTION, CoreAdminParams.CoreAdminAction.REQUESTAPPLYUPDATES.toString());
-          params.set(CoreAdminParams.NAME, coreNodeName);
+          params.set(CoreAdminParams.NAME, replicaName);
 
           shardRequestTracker.sendShardRequest(nodeName, params, shardHandler);
         }
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
index 770dfac..d4d0632 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
@@ -329,11 +329,11 @@ public class SplitShardCmd implements OverseerCollectionMessageHandler.Cmd {
         for (String subShardName : subShardNames) {
           // wait for parent leader to acknowledge the sub-shard core
           log.debug("Asking parent leader to wait for: {} to be alive on: {}", subShardName, nodeName);
-          String coreNodeName = ocmh.waitForCoreNodeName(collectionName, nodeName, subShardName);
+          String replicaName = ocmh.waitForReplica(collectionName, nodeName, subShardName);
           CoreAdminRequest.WaitForState cmd = new CoreAdminRequest.WaitForState();
           cmd.setCoreName(subShardName);
           cmd.setNodeName(nodeName);
-          cmd.setCoreNodeName(coreNodeName);
+          cmd.setReplicaName(replicaName);
           cmd.setState(Replica.State.ACTIVE);
           cmd.setCheckLive(true);
           cmd.setOnlyIfLeader(true);
diff --git a/solr/core/src/java/org/apache/solr/cloud/overseer/ClusterStateMutator.java b/solr/core/src/java/org/apache/solr/cloud/overseer/ClusterStateMutator.java
index 8c69caf..d5a5b20 100644
--- a/solr/core/src/java/org/apache/solr/cloud/overseer/ClusterStateMutator.java
+++ b/solr/core/src/java/org/apache/solr/cloud/overseer/ClusterStateMutator.java
@@ -169,7 +169,7 @@ public class ClusterStateMutator {
     return null;
   }
 
-  public static String getAssignedCoreNodeName(DocCollection collection, String forNodeName, String forCoreName) {
+  public static String getAssignedReplicaName(DocCollection collection, String forNodeName, String forCoreName) {
     Collection<Slice> slices = collection != null ? collection.getSlices() : null;
     if (slices != null) {
       for (Slice slice : slices) {
diff --git a/solr/core/src/java/org/apache/solr/cloud/overseer/ReplicaMutator.java b/solr/core/src/java/org/apache/solr/cloud/overseer/ReplicaMutator.java
index ecf06e4..78857af 100644
--- a/solr/core/src/java/org/apache/solr/cloud/overseer/ReplicaMutator.java
+++ b/solr/core/src/java/org/apache/solr/cloud/overseer/ReplicaMutator.java
@@ -258,38 +258,38 @@ public class ReplicaMutator {
 
   private ZkWriteCommand updateState(final ClusterState prevState, ZkNodeProps message, String collectionName, Integer numShards, boolean collectionExists) {
     String sliceName = message.getStr(ZkStateReader.SHARD_ID_PROP);
-    String coreNodeName = message.getStr(ZkStateReader.CORE_NODE_NAME_PROP);
+    String replicaName = message.getStr(ZkStateReader.CORE_NODE_NAME_PROP);
     boolean forceSetState = message.getBool(ZkStateReader.FORCE_SET_STATE_PROP, true);
 
     DocCollection collection = prevState.getCollectionOrNull(collectionName);
-    if (!forceSetState && !CloudUtil.replicaExists(prevState, collectionName, sliceName, coreNodeName)) {
+    if (!forceSetState && !CloudUtil.replicaExists(prevState, collectionName, sliceName, replicaName)) {
       log.info("Failed to update state because the replica does not exist, {}", message);
       return ZkStateWriter.NO_OP;
     }
     boolean persistCollectionState = collection != null && collection.isPerReplicaState();
 
-    if (coreNodeName == null) {
-      coreNodeName = ClusterStateMutator.getAssignedCoreNodeName(collection,
+    if (replicaName == null) {
+      replicaName = ClusterStateMutator.getAssignedReplicaName(collection,
           message.getStr(ZkStateReader.NODE_NAME_PROP), message.getStr(ZkStateReader.CORE_NAME_PROP));
-      if (coreNodeName != null) {
-        log.debug("node={} is already registered", coreNodeName);
+      if (replicaName != null) {
+        log.debug("node={} is already registered", replicaName);
       } else {
         if (!forceSetState) {
           log.info("Failed to update state because the replica does not exist, {}", message);
           return ZkStateWriter.NO_OP;
         }
         persistCollectionState = true;
-        // if coreNodeName is null, auto assign one
-        coreNodeName = Assign.assignCoreNodeName(stateManager, collection);
+        // if replicaName is null, auto assign one
+        replicaName = Assign.assignReplicaName(stateManager, collection);
       }
       message.getProperties().put(ZkStateReader.CORE_NODE_NAME_PROP,
-          coreNodeName);
+          replicaName);
     }
 
     // use the provided non null shardId
     if (sliceName == null) {
       //get shardId from ClusterState
-      sliceName = ClusterStateMutator.getAssignedId(collection, coreNodeName);
+      sliceName = ClusterStateMutator.getAssignedId(collection, replicaName);
       if (sliceName != null) {
         log.debug("shard={} is already registered", sliceName);
       }
@@ -311,7 +311,7 @@ public class ReplicaMutator {
 
     Map<String, Object> replicaProps = new LinkedHashMap<>(message.getProperties());
     if (slice != null) {
-      Replica oldReplica = slice.getReplica(coreNodeName);
+      Replica oldReplica = slice.getReplica(replicaName);
       if (oldReplica != null) {
         if (oldReplica.containsKey(ZkStateReader.LEADER_PROP)) {
           replicaProps.put(ZkStateReader.LEADER_PROP, oldReplica.get(ZkStateReader.LEADER_PROP));
@@ -351,7 +351,7 @@ public class ReplicaMutator {
     String shardParent = (String) replicaProps.remove(ZkStateReader.SHARD_PARENT_PROP);
 
 
-    Replica replica = new Replica(coreNodeName, replicaProps, collectionName, sliceName);
+    Replica replica = new Replica(replicaName, replicaProps, collectionName, sliceName);
 
     log.debug("Will update state for replica: {}", replica);
 
@@ -359,7 +359,7 @@ public class ReplicaMutator {
     Map<String, Replica> replicas;
 
     if (slice != null) {
-      collection = checkAndCompleteShardSplit(prevState, collection, coreNodeName, sliceName, replica);
+      collection = checkAndCompleteShardSplit(prevState, collection, replicaName, sliceName, replica);
       // get the current slice again because it may have been updated due to checkAndCompleteShardSplit method
       slice = collection.getSlice(sliceName);
       sliceProps = slice.getProperties();
@@ -384,18 +384,18 @@ public class ReplicaMutator {
     }
   }
 
-  private DocCollection checkAndCompleteShardSplit(ClusterState prevState, DocCollection collection, String coreNodeName, String sliceName, Replica replica) {
+  private DocCollection checkAndCompleteShardSplit(ClusterState prevState, DocCollection collection, String replicaName, String sliceName, Replica replica) {
     Slice slice = collection.getSlice(sliceName);
     Map<String, Object> sliceProps = slice.getProperties();
     if (slice.getState() == Slice.State.RECOVERY) {
       log.info("Shard: {} is in recovery state", sliceName);
       // is this replica active?
       if (replica.getState() == Replica.State.ACTIVE) {
-        log.info("Shard: {} is in recovery state and coreNodeName: {} is active", sliceName, coreNodeName);
+        log.info("Shard: {} is in recovery state and replicaName: {} is active", sliceName, replicaName);
         // are all other replicas also active?
         boolean allActive = true;
         for (Map.Entry<String, Replica> entry : slice.getReplicasMap().entrySet()) {
-          if (coreNodeName.equals(entry.getKey())) continue;
+          if (replicaName.equals(entry.getKey())) continue;
           if (entry.getValue().getState() != Replica.State.ACTIVE) {
             allActive = false;
             break;
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 019339e..b5bf512 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
@@ -83,13 +83,13 @@ public class SliceMutator {
       log.error("Invalid Collection/Slice {}/{} ", coll, slice);
       return ZkStateWriter.NO_OP;
     }
-    String coreNodeName;
+    String replicaName;
     if (message.getStr(ZkStateReader.CORE_NODE_NAME_PROP) != null) {
-      coreNodeName = message.getStr(ZkStateReader.CORE_NODE_NAME_PROP);
+      replicaName = message.getStr(ZkStateReader.CORE_NODE_NAME_PROP);
     } else {
-      coreNodeName = Assign.assignCoreNodeName(stateManager, collection);
+      replicaName = Assign.assignReplicaName(stateManager, collection);
     }
-    Replica replica = new Replica(coreNodeName,
+    Replica replica = new Replica(replicaName,
         makeMap(
             ZkStateReader.CORE_NAME_PROP, message.getStr(ZkStateReader.CORE_NAME_PROP),
             ZkStateReader.STATE_PROP, message.getStr(ZkStateReader.STATE_PROP),
@@ -287,10 +287,10 @@ public class SliceMutator {
     return ZkStateWriter.NO_OP;
   }
 
-  public static DocCollection updateReplica(DocCollection collection, final Slice slice, String coreNodeName, final Replica replica) {
+  public static DocCollection updateReplica(DocCollection collection, final Slice slice, String replicaName, final Replica replica) {
     Map<String, Replica> replicasCopy = slice.getReplicasCopy();
     if (replica == null) {
-      replicasCopy.remove(coreNodeName);
+      replicasCopy.remove(replicaName);
     } else {
       replicasCopy.put(replica.getName(), replica);
     }
diff --git a/solr/core/src/java/org/apache/solr/core/CloudConfig.java b/solr/core/src/java/org/apache/solr/core/CloudConfig.java
index c8efbbb..3af4888 100644
--- a/solr/core/src/java/org/apache/solr/core/CloudConfig.java
+++ b/solr/core/src/java/org/apache/solr/core/CloudConfig.java
@@ -109,7 +109,7 @@ public class CloudConfig {
     return leaderConflictResolveWait;
   }
 
-  public boolean getGenericCoreNodeNames() {
+  public boolean getGenericReplicaNames() {
     return useGenericCoreNames;
   }
 
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index d8a6a33..94650d6 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -1306,10 +1306,10 @@ public class CoreContainer {
       boolean preExisitingZkEntry = false;
       try {
         if (getZkController() != null) {
-          if (cd.getCloudDescriptor().getCoreNodeName() == null) {
+          if (cd.getCloudDescriptor().getReplicaName() == null) {
             throw new SolrException(ErrorCode.SERVER_ERROR, "coreNodeName missing " + parameters.toString());
           }
-          preExisitingZkEntry = getZkController().checkIfCoreNodeNameAlreadyExists(cd);
+          preExisitingZkEntry = getZkController().checkIfReplicaNameAlreadyExists(cd);
         }
 
         // Much of the logic in core handling pre-supposes that the core.properties file already exists, so create it
@@ -1527,7 +1527,7 @@ public class CoreContainer {
               log.info("Found active leader, will attempt to create fresh core and recover.");
               resetIndexDirectory(dcore, coreConfig);
               // the index of this core is emptied, its term should be set to 0
-              getZkController().getShardTerms(desc.getCollectionName(), desc.getShardId()).setTermToZero(desc.getCoreNodeName());
+              getZkController().getShardTerms(desc.getCollectionName(), desc.getShardId()).setTermToZero(desc.getReplicaName());
               return new SolrCore(this, dcore, coreConfig);
             }
           } catch (SolrException se) {
@@ -1739,7 +1739,7 @@ public class CoreContainer {
 
 
         if (docCollection != null) {
-          Replica replica = docCollection.getReplica(cd.getCloudDescriptor().getCoreNodeName());
+          Replica replica = docCollection.getReplica(cd.getCloudDescriptor().getReplicaName());
           assert replica != null;
           if (replica.getType() == Replica.Type.TLOG) { // TODO: needed here?
             getZkController().stopReplicationFromLeader(core.getName());
diff --git a/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java b/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java
index 033f259..35f0dff 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java
@@ -35,10 +35,13 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.solr.cloud.CloudDescriptor;
 import org.apache.solr.cloud.ZkController;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.util.PropertiesUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.solr.common.params.CommonParams.REPLICA_NAME;
+
 /**
  * Metadata about a {@link SolrCore}.
  * It's mostly loaded from a file on disk at the very beginning of loading a core.
@@ -61,7 +64,8 @@ public class CoreDescriptor {
   public static final String CORE_PROPERTIES = "properties";
   public static final String CORE_LOADONSTARTUP = "loadOnStartup";
   public static final String CORE_TRANSIENT = "transient";
-  public static final String CORE_NODE_NAME = "coreNodeName";
+  @Deprecated
+  public static final String CORE_NODE_NAME = REPLICA_NAME;
   public static final String CORE_CONFIGSET = "configSet";
   public static final String CORE_CONFIGSET_PROPERTIES = "configSetProperties";
   public static final String SOLR_CORE_PROP_PREFIX = "solr.core.";
@@ -120,7 +124,7 @@ public class CoreDescriptor {
       CORE_SHARD,
       CORE_COLLECTION,
       CORE_ROLES,
-      CORE_NODE_NAME,
+      REPLICA_NAME,
       CloudDescriptor.NUM_SHARDS
   );
 
diff --git a/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java b/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java
index 6b77617..688f1ce 100644
--- a/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java
+++ b/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java
@@ -413,7 +413,7 @@ public class HdfsDirectoryFactory extends CachingDirectoryFactory implements Sol
       path = URLEncoder.encode(cd.getCloudDescriptor().getCollectionName(),
           "UTF-8")
           + "/"
-          + URLEncoder.encode(cd.getCloudDescriptor().getCoreNodeName(),
+          + URLEncoder.encode(cd.getCloudDescriptor().getReplicaName(),
               "UTF-8");
     } else {
       path = cd.getName();
diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
index 66d195c..f9af651 100644
--- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
+++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
@@ -372,7 +372,7 @@ public class IndexFetcher {
         assert !solrCore.isClosed(): "Replication should be stopped before closing the core";
         Replica replica = getLeaderReplica();
         CloudDescriptor cd = solrCore.getCoreDescriptor().getCloudDescriptor();
-        if (cd.getCoreNodeName().equals(replica.getName())) {
+        if (cd.getReplicaName().equals(replica.getName())) {
           return IndexFetchResult.EXPECTING_NON_LEADER;
         }
         if (replica.getState() != Replica.State.ACTIVE) {
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
index 0ef3ebb..96e78ce 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
@@ -35,10 +35,7 @@ import org.apache.solr.cloud.ZkController;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrException.ErrorCode;
 import org.apache.solr.common.cloud.ZkStateReader;
-import org.apache.solr.common.params.CommonAdminParams;
-import org.apache.solr.common.params.CoreAdminParams;
-import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.common.params.SolrParams;
+import org.apache.solr.common.params.*;
 import org.apache.solr.common.util.ExecutorUtil;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.CoreContainer;
@@ -57,6 +54,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 
+import static org.apache.solr.common.params.CommonParams.REPLICA_NAME;
 import static org.apache.solr.common.params.CoreAdminParams.ACTION;
 import static org.apache.solr.common.params.CoreAdminParams.CoreAdminAction.STATUS;
 import static org.apache.solr.security.PermissionNameProvider.Name.CORE_EDIT_PERM;
@@ -233,7 +231,7 @@ public class CoreAdminHandler extends RequestHandlerBase implements PermissionNa
       .put(CoreAdminParams.SHARD, CoreDescriptor.CORE_SHARD)
       .put(CoreAdminParams.COLLECTION, CoreDescriptor.CORE_COLLECTION)
       .put(CoreAdminParams.ROLES, CoreDescriptor.CORE_ROLES)
-      .put(CoreAdminParams.CORE_NODE_NAME, CoreDescriptor.CORE_NODE_NAME)
+      .put(REPLICA_NAME, REPLICA_NAME)
       .put(ZkStateReader.NUM_SHARDS_PROP, CloudDescriptor.NUM_SHARDS)
       .put(CoreAdminParams.REPLICA_TYPE, CloudDescriptor.REPLICA_TYPE)
       .build();
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java
index 4f09c85..fc5e6a9 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java
@@ -338,7 +338,7 @@ enum CoreAdminOperation implements CoreAdminOp {
               SimpleOrderedMap cloudInfo = new SimpleOrderedMap<>();
               cloudInfo.add(COLLECTION, core.getCoreDescriptor().getCloudDescriptor().getCollectionName());
               cloudInfo.add(SHARD, core.getCoreDescriptor().getCloudDescriptor().getShardId());
-              cloudInfo.add(REPLICA, core.getCoreDescriptor().getCloudDescriptor().getCoreNodeName());
+              cloudInfo.add(REPLICA, core.getCoreDescriptor().getCloudDescriptor().getReplicaName());
               cloudInfo.add(REPLICA_TYPE, core.getCoreDescriptor().getCloudDescriptor().getReplicaType().name());
               info.add("cloud", cloudInfo);
             }
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/PrepRecoveryOp.java b/solr/core/src/java/org/apache/solr/handler/admin/PrepRecoveryOp.java
index 15be746..2f5ef74 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/PrepRecoveryOp.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/PrepRecoveryOp.java
@@ -30,6 +30,7 @@ import org.apache.solr.common.SolrException.ErrorCode;
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.common.cloud.Slice;
 import org.apache.solr.common.cloud.ZkStateReader;
+import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.CoreAdminParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.core.CoreContainer;
@@ -39,6 +40,8 @@ import org.apache.solr.util.TestInjection;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.solr.common.params.CommonParams.REPLICA_NAME;
+
 
 class PrepRecoveryOp implements CoreAdminHandler.CoreAdminOp {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -52,7 +55,7 @@ class PrepRecoveryOp implements CoreAdminHandler.CoreAdminOp {
     String cname = params.get(CoreAdminParams.CORE, "");
 
     String nodeName = params.get("nodeName");
-    String coreNodeName = params.get("coreNodeName");
+    String replicaName = params.get(REPLICA_NAME);
     Replica.State waitForState = Replica.State.getState(params.get(ZkStateReader.STATE_PROP));
     Boolean checkLive = params.getBool("checkLive");
     Boolean onlyIfLeader = params.getBool("onlyIfLeader");
@@ -62,8 +65,8 @@ class PrepRecoveryOp implements CoreAdminHandler.CoreAdminOp {
     // wait long enough for the leader conflict to work itself out plus a little extra
     int conflictWaitMs = coreContainer.getZkController().getLeaderConflictResolveWait();
     log.info(
-        "Going to wait for coreNodeName: {}, state: {}, checkLive: {}, onlyIfLeader: {}, onlyIfLeaderActive: {}",
-        coreNodeName, waitForState, checkLive, onlyIfLeader, onlyIfLeaderActive);
+        "Going to wait for replicaName: {}, state: {}, checkLive: {}, onlyIfLeader: {}, onlyIfLeaderActive: {}",
+        replicaName, waitForState, checkLive, onlyIfLeader, onlyIfLeaderActive);
 
     String collectionName;
     CloudDescriptor cloudDescriptor;
@@ -94,7 +97,7 @@ class PrepRecoveryOp implements CoreAdminHandler.CoreAdminOp {
         boolean live = false;
         Slice slice = c.getSlice(cloudDescriptor.getShardId());
         if (slice != null) {
-          final Replica replica = slice.getReplicasMap().get(coreNodeName);
+          final Replica replica = slice.getReplicasMap().get(replicaName);
           if (replica != null) {
             state = replica.getState();
             live = n.contains(nodeName);
@@ -117,8 +120,8 @@ class PrepRecoveryOp implements CoreAdminHandler.CoreAdminOp {
 
             ZkShardTerms shardTerms = coreContainer.getZkController().getShardTerms(collectionName, slice.getName());
             // if the replica is waiting for leader to see recovery state, the leader should refresh its terms
-            if (waitForState == Replica.State.RECOVERING && shardTerms.registered(coreNodeName)
-                && shardTerms.skipSendingUpdatesTo(coreNodeName)) {
+            if (waitForState == Replica.State.RECOVERING && shardTerms.registered(replicaName)
+                && shardTerms.skipSendingUpdatesTo(replicaName)) {
               // The replica changed it term, then published itself as RECOVERING.
               // This core already see replica as RECOVERING
               // so it is guarantees that a live-fetch will be enough for this core to see max term published
@@ -134,7 +137,7 @@ class PrepRecoveryOp implements CoreAdminHandler.CoreAdminOp {
                       ", isLeader? " + cloudDescriptor.isLeader() +
                       ", live=" + live + ", checkLive=" + checkLive + ", currentState=" + state
                       + ", localState=" + localState + ", nodeName=" + nodeName +
-                      ", coreNodeName=" + coreNodeName + ", onlyIfActiveCheckResult=" + onlyIfActiveCheckResult
+                      ", replicaName=" + replicaName + ", onlyIfActiveCheckResult=" + onlyIfActiveCheckResult
                       + ", nodeProps: " + replica); //nowarn
             }
             if (!onlyIfActiveCheckResult && replica != null && (state == waitForState || leaderDoesNotNeedRecovery)) {
diff --git a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
index ad14837..d44eabb 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
@@ -126,7 +126,7 @@ public class RealTimeGetComponent extends SearchComponent
         if (replicaType == Replica.Type.PULL) {
           throw new SolrException(ErrorCode.BAD_REQUEST, 
               String.format(Locale.ROOT, "%s can't handle realtime get requests. Replicas of type %s do not support these type of requests", 
-                  cloudDesc.getCoreNodeName(),
+                  cloudDesc.getReplicaName(),
                   Replica.Type.PULL));
         } 
         // non-leader TLOG replicas should not respond to distrib /get requests, but internal requests are OK
diff --git a/solr/core/src/java/org/apache/solr/logging/MDCLoggingContext.java b/solr/core/src/java/org/apache/solr/logging/MDCLoggingContext.java
index 492735b..677d8c6 100644
--- a/solr/core/src/java/org/apache/solr/logging/MDCLoggingContext.java
+++ b/solr/core/src/java/org/apache/solr/logging/MDCLoggingContext.java
@@ -138,7 +138,7 @@ public class MDCLoggingContext {
       if (ccd != null) {
         setCollection(ccd.getCollectionName());
         setShard(ccd.getShardId());
-        setReplica(ccd.getCoreNodeName());
+        setReplica(ccd.getReplicaName());
       }
     }
   }
diff --git a/solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java b/solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java
index f05889c..39b460a 100644
--- a/solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java
+++ b/solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java
@@ -63,11 +63,11 @@ public class SolrCoreMetricManager implements Closeable {
       cloudMode = true;
       collectionName = core.getCoreDescriptor().getCollectionName();
       shardName = cd.getShardId();
-      //replicaName = cd.getCoreNodeName();
+      //replicaName = cd.getReplicaName();
       String coreName = core.getName();
       replicaName = Utils.parseMetricsReplicaName(collectionName, coreName);
       if (replicaName == null) {
-        replicaName = cd.getCoreNodeName();
+        replicaName = cd.getReplicaName();
       }
     }
   }
diff --git a/solr/core/src/java/org/apache/solr/metrics/reporters/solr/SolrShardReporter.java b/solr/core/src/java/org/apache/solr/metrics/reporters/solr/SolrShardReporter.java
index 8791160..734258f 100644
--- a/solr/core/src/java/org/apache/solr/metrics/reporters/solr/SolrShardReporter.java
+++ b/solr/core/src/java/org/apache/solr/metrics/reporters/solr/SolrShardReporter.java
@@ -136,8 +136,8 @@ public class SolrShardReporter extends SolrCoreReporter {
       log.warn("period={}, not starting shard reporter ", period);
       return;
     }
-    // our id is coreNodeName
-    String id = core.getCoreDescriptor().getCloudDescriptor().getCoreNodeName();
+    // our id is replicaName
+    String id = core.getCoreDescriptor().getCloudDescriptor().getReplicaName();
     // target registry is the leaderRegistryName
     String groupId = core.getCoreMetricManager().getLeaderRegistryName();
     if (groupId == null) {
diff --git a/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java b/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java
index ddabd25..72a06dd 100644
--- a/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java
+++ b/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java
@@ -222,14 +222,14 @@ public final class ManagedIndexSchema extends IndexSchema {
    * Block up to a specified maximum time until we see agreement on the schema
    * version in ZooKeeper across all replicas for a collection.
    */
-  public static void waitForSchemaZkVersionAgreement(String collection, String localCoreNodeName,
+  public static void waitForSchemaZkVersionAgreement(String collection, String localReplicaName,
                                                      int schemaZkVersion, ZkController zkController, int maxWaitSecs)
   {
     RTimer timer = new RTimer();
 
     // get a list of active replica cores to query for the schema zk version (skipping this core of course)
     List<GetZkSchemaVersionCallable> concurrentTasks = new ArrayList<>();
-    for (String coreUrl : getActiveReplicaCoreUrls(zkController, collection, localCoreNodeName))
+    for (String coreUrl : getActiveReplicaCoreUrls(zkController, collection, localReplicaName))
       concurrentTasks.add(new GetZkSchemaVersionCallable(coreUrl, schemaZkVersion));
     if (concurrentTasks.isEmpty())
       return; // nothing to wait for ...
@@ -278,7 +278,7 @@ public final class ManagedIndexSchema extends IndexSchema {
 
     } catch (InterruptedException ie) {
       log.warn("Core {} was interrupted waiting for schema version {} to propagate to {} replicas for collection {}"
-          , localCoreNodeName, schemaZkVersion, concurrentTasks.size(), collection);
+          , localReplicaName, schemaZkVersion, concurrentTasks.size(), collection);
       Thread.currentThread().interrupt();
     } finally {
       if (!parallelExecutor.isShutdown())
@@ -291,7 +291,7 @@ public final class ManagedIndexSchema extends IndexSchema {
     }
   }
 
-  protected static List<String> getActiveReplicaCoreUrls(ZkController zkController, String collection, String localCoreNodeName) {
+  protected static List<String> getActiveReplicaCoreUrls(ZkController zkController, String collection, String localReplicaName) {
     List<String> activeReplicaCoreUrls = new ArrayList<>();
     ZkStateReader zkStateReader = zkController.getZkStateReader();
     ClusterState clusterState = zkStateReader.getClusterState();
@@ -304,7 +304,7 @@ public final class ManagedIndexSchema extends IndexSchema {
         if (replicasMap != null) {
           for (Map.Entry<String, Replica> entry : replicasMap.entrySet()) {
             Replica replica = entry.getValue();
-            if (!localCoreNodeName.equals(replica.getName()) &&
+            if (!localReplicaName.equals(replica.getName()) &&
                 replica.getState() == Replica.State.ACTIVE &&
                 liveNodes.contains(replica.getNodeName())) {
               ZkCoreNodeProps replicaCoreProps = new ZkCoreNodeProps(replica);
diff --git a/solr/core/src/java/org/apache/solr/schema/SchemaManager.java b/solr/core/src/java/org/apache/solr/schema/SchemaManager.java
index fe2db9a..c0f6d3c 100644
--- a/solr/core/src/java/org/apache/solr/schema/SchemaManager.java
+++ b/solr/core/src/java/org/apache/solr/schema/SchemaManager.java
@@ -172,7 +172,7 @@ public class SchemaManager {
         throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
             "Not enough time left to update replicas. However, the schema is updated already.");
       }
-      ManagedIndexSchema.waitForSchemaZkVersionAgreement(collection, cd.getCloudDescriptor().getCoreNodeName(),
+      ManagedIndexSchema.waitForSchemaZkVersionAgreement(collection, cd.getCloudDescriptor().getReplicaName(),
           latestVersion, core.getCoreContainer().getZkController(), (int) timeOut.timeLeft(TimeUnit.SECONDS));
     }
   }
diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java
index aa7c61e..88cb404 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java
@@ -79,7 +79,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
   private final ZkController zkController;
   private final SolrCmdDistributor cmdDistrib;
   protected List<SolrCmdDistributor.Node> nodes;
-  private Set<String> skippedCoreNodeNames;
+  private Set<String> skippedReplicaNames;
   private final String collection;
   private boolean readOnlyCollection = false;
 
@@ -168,7 +168,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
       Thread.interrupted();
       throw new SolrException(SolrException.ErrorCode.SERVICE_UNAVAILABLE, "Exception finding leader for shard " + cloudDesc.getShardId(), e);
     }
-    isLeader = leaderReplica.getName().equals(cloudDesc.getCoreNodeName());
+    isLeader = leaderReplica.getName().equals(cloudDesc.getReplicaName());
 
     nodes = getCollectionUrls(collection, EnumSet.of(Replica.Type.TLOG,Replica.Type.NRT), true);
     if (nodes == null) {
@@ -405,9 +405,9 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
 
         // Am I the leader for this slice?
         ZkCoreNodeProps coreLeaderProps = new ZkCoreNodeProps(leader);
-        String leaderCoreNodeName = leader.getName();
-        String coreNodeName = cloudDesc.getCoreNodeName();
-        isLeader = coreNodeName.equals(leaderCoreNodeName);
+        String leaderReplicaName = leader.getName();
+        String replicaName = cloudDesc.getReplicaName();
+        isLeader = replicaName.equals(leaderReplicaName);
 
         if (isLeader) {
           // don't forward to ourself
@@ -516,7 +516,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
 
     try {
       Replica leaderReplica = zkController.getZkStateReader().getLeaderRetry(collection, shardId);
-      isLeader = leaderReplica.getName().equals(cloudDesc.getCoreNodeName());
+      isLeader = leaderReplica.getName().equals(cloudDesc.getReplicaName());
 
       // TODO: what if we are no longer the leader?
 
@@ -628,7 +628,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
       // Not equivalent to getLeaderProps, which  retries to find a leader.
       // Replica leader = slice.getLeader();
       Replica leaderReplica = zkController.getZkStateReader().getLeaderRetry(collection, shardId);
-      isLeader = leaderReplica.getName().equals(cloudDesc.getCoreNodeName());
+      isLeader = leaderReplica.getName().equals(cloudDesc.getReplicaName());
 
       if (!isLeader) {
         isSubShardLeader = amISubShardLeader(coll, slice, id, doc);
@@ -652,11 +652,11 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
         // that means I want to forward onto my replicas...
         // so get the replicas...
         forwardToLeader = false;
-        String leaderCoreNodeName = leaderReplica.getName();
+        String leaderReplicaName = leaderReplica.getName();
         List<Replica> replicas = clusterState.getCollection(collection)
             .getSlice(shardId)
             .getReplicas(EnumSet.of(Replica.Type.NRT, Replica.Type.TLOG));
-        replicas.removeIf((replica) -> replica.getName().equals(leaderCoreNodeName));
+        replicas.removeIf((replica) -> replica.getName().equals(leaderReplicaName));
         if (replicas.isEmpty()) {
           return null;
         }
@@ -671,21 +671,21 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
         }
 
         List<SolrCmdDistributor.Node> nodes = new ArrayList<>(replicas.size());
-        skippedCoreNodeNames = new HashSet<>();
+        skippedReplicaNames = new HashSet<>();
         ZkShardTerms zkShardTerms = zkController.getShardTerms(collection, shardId);
         for (Replica replica: replicas) {
-          String coreNodeName = replica.getName();
+          String replicaName = replica.getName();
           if (skipList != null && skipListSet.contains(replica.getCoreUrl())) {
             if (log.isInfoEnabled()) {
               log.info("check url:{} against:{} result:true", replica.getCoreUrl(), skipListSet);
             }
-          } else if(zkShardTerms.registered(coreNodeName) && zkShardTerms.skipSendingUpdatesTo(coreNodeName)) {
+          } else if(zkShardTerms.registered(replicaName) && zkShardTerms.skipSendingUpdatesTo(replicaName)) {
             if (log.isDebugEnabled()) {
               log.debug("skip url:{} cause its term is less than leader", replica.getCoreUrl());
             }
-            skippedCoreNodeNames.add(replica.getName());
+            skippedReplicaNames.add(replica.getName());
           } else if (!clusterState.getLiveNodes().contains(replica.getNodeName()) || replica.getState() == Replica.State.DOWN) {
-            skippedCoreNodeNames.add(replica.getName());
+            skippedReplicaNames.add(replica.getName());
           } else {
             nodes.add(new SolrCmdDistributor.StdNode(new ZkCoreNodeProps(replica), collection, shardId, maxRetriesToFollowers));
           }
@@ -790,7 +790,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
     final Slice.State state = mySlice.getState();
     if (state == Slice.State.CONSTRUCTION || state == Slice.State.RECOVERY) {
       Replica myLeader = zkController.getZkStateReader().getLeaderRetry(collection, myShardId);
-      boolean amILeader = myLeader.getName().equals(cloudDesc.getCoreNodeName());
+      boolean amILeader = myLeader.getName().equals(cloudDesc.getReplicaName());
       if (amILeader) {
         // Does the document belong to my hash range as well?
         DocRouter.Range myRange = mySlice.getRange();
@@ -808,11 +808,11 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
   }
 
   protected List<SolrCmdDistributor.Node> getReplicaNodesForLeader(String shardId, Replica leaderReplica) {
-    String leaderCoreNodeName = leaderReplica.getName();
+    String leaderReplicaName = leaderReplica.getName();
     List<Replica> replicas = clusterState.getCollection(collection)
         .getSlice(shardId)
         .getReplicas(EnumSet.of(Replica.Type.NRT, Replica.Type.TLOG));
-    replicas.removeIf((replica) -> replica.getName().equals(leaderCoreNodeName));
+    replicas.removeIf((replica) -> replica.getName().equals(leaderReplicaName));
     if (replicas.isEmpty()) {
       return null;
     }
@@ -827,22 +827,22 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
     }
 
     List<SolrCmdDistributor.Node> nodes = new ArrayList<>(replicas.size());
-    skippedCoreNodeNames = new HashSet<>();
+    skippedReplicaNames = new HashSet<>();
     ZkShardTerms zkShardTerms = zkController.getShardTerms(collection, shardId);
     for (Replica replica : replicas) {
-      String coreNodeName = replica.getName();
+      String replicaName = replica.getName();
       if (skipList != null && skipListSet.contains(replica.getCoreUrl())) {
         if (log.isInfoEnabled()) {
           log.info("check url:{} against:{} result:true", replica.getCoreUrl(), skipListSet);
         }
-      } else if (zkShardTerms.registered(coreNodeName) && zkShardTerms.skipSendingUpdatesTo(coreNodeName)) {
+      } else if (zkShardTerms.registered(replicaName) && zkShardTerms.skipSendingUpdatesTo(replicaName)) {
         if (log.isDebugEnabled()) {
           log.debug("skip url:{} cause its term is less than leader", replica.getCoreUrl());
         }
-        skippedCoreNodeNames.add(replica.getName());
+        skippedReplicaNames.add(replica.getName());
       } else if (!clusterState.getLiveNodes().contains(replica.getNodeName())
           || replica.getState() == Replica.State.DOWN) {
-        skippedCoreNodeNames.add(replica.getName());
+        skippedReplicaNames.add(replica.getName());
       } else {
         nodes.add(new SolrCmdDistributor.StdNode(new ZkCoreNodeProps(replica), collection, shardId));
       }
@@ -1046,8 +1046,8 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
     boolean shouldUpdateTerms = isLeader && isIndexChanged;
     if (shouldUpdateTerms) {
       ZkShardTerms zkShardTerms = zkController.getShardTerms(cloudDesc.getCollectionName(), cloudDesc.getShardId());
-      if (skippedCoreNodeNames != null) {
-        zkShardTerms.ensureTermsIsHigher(cloudDesc.getCoreNodeName(), skippedCoreNodeNames);
+      if (skippedReplicaNames != null) {
+        zkShardTerms.ensureTermsIsHigher(cloudDesc.getReplicaName(), skippedReplicaNames);
       }
       zkController.getShardTerms(collection, cloudDesc.getShardId()).ensureHighestTermsAreNotZero();
     }
@@ -1096,7 +1096,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
       if ("LeaderChanged".equals(cause)) {
         // let's just fail this request and let the client retry? or just call processAdd again?
         log.error("On {}, replica {} now thinks it is the leader! Failing the request to let the client retry!"
-            , cloudDesc.getCoreNodeName(), replicaUrl, error.e);
+            , cloudDesc.getReplicaName(), replicaUrl, error.e);
         errorsForClient.add(error);
         continue;
       }
@@ -1110,24 +1110,24 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
         shardId = stdNode.getShardId();
 
         // before we go setting other replicas to down, make sure we're still the leader!
-        String leaderCoreNodeName = null;
+        String leaderReplicaName = null;
         Exception getLeaderExc = null;
         Replica leaderProps = null;
         try {
           leaderProps = zkController.getZkStateReader().getLeader(collection, shardId);
           if (leaderProps != null) {
-            leaderCoreNodeName = leaderProps.getName();
+            leaderReplicaName = leaderProps.getName();
           }
         } catch (Exception exc) {
           getLeaderExc = exc;
         }
-        if (leaderCoreNodeName == null) {
+        if (leaderReplicaName == null) {
           log.warn("Failed to determine if {} is still the leader for collection={} shardId={} before putting {} into leader-initiated recovery",
-              cloudDesc.getCoreNodeName(), collection, shardId, replicaUrl, getLeaderExc);
+              cloudDesc.getReplicaName(), collection, shardId, replicaUrl, getLeaderExc);
         }
 
         List<ZkCoreNodeProps> myReplicas = zkController.getZkStateReader().getReplicaProps(collection,
-            cloudDesc.getShardId(), cloudDesc.getCoreNodeName());
+            cloudDesc.getShardId(), cloudDesc.getReplicaName());
         boolean foundErrorNodeInReplicaList = false;
         if (myReplicas != null) {
           for (ZkCoreNodeProps replicaProp : myReplicas) {
@@ -1138,16 +1138,16 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
           }
         }
 
-        if (leaderCoreNodeName != null && cloudDesc.getCoreNodeName().equals(leaderCoreNodeName) // we are still same leader
+        if (leaderReplicaName != null && cloudDesc.getCoreNodeName().equals(leaderReplicaName) // we are still same leader
             && foundErrorNodeInReplicaList // we found an error for one of replicas
             && !stdNode.getNodeProps().getCoreUrl().equals(leaderProps.getCoreUrl())) { // we do not want to put ourself into LIR
           try {
-            String coreNodeName = ((Replica) stdNode.getNodeProps().getNodeProps()).getName();
+            String replicaName = ((Replica) stdNode.getNodeProps().getNodeProps()).getName();
             // if false, then the node is probably not "live" anymore
             // and we do not need to send a recovery message
             Throwable rootCause = SolrException.getRootCause(error.e);
-            log.error("Setting up to try to start recovery on replica {} with url {} by increasing leader term", coreNodeName, replicaUrl, rootCause);
-            replicasShouldBeInLowerTerms.add(coreNodeName);
+            log.error("Setting up to try to start recovery on replica {} with url {} by increasing leader term", replicaName, replicaUrl, rootCause);
+            replicasShouldBeInLowerTerms.add(replicaName);
           } catch (Exception exc) {
             Throwable setLirZnodeFailedCause = SolrException.getRootCause(exc);
             log.error("Leader failed to set replica {} state to DOWN due to: {}"
@@ -1157,7 +1157,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
           // not the leader anymore maybe or the error'd node is not my replica?
           if (!foundErrorNodeInReplicaList) {
             log.warn("Core {} belonging to {} {}, does not have error'd node {} as a replica. No request recovery command will be sent!"
-                , cloudDesc.getCoreNodeName(), collection, cloudDesc.getShardId(), stdNode.getNodeProps().getCoreUrl());
+                , cloudDesc.getReplicaName(), collection, cloudDesc.getShardId(), stdNode.getNodeProps().getCoreUrl());
             if (!shardId.equals(cloudDesc.getShardId())) {
               // some replicas on other shard did not receive the updates (ex: during splitshard),
               // exception must be notified to clients
@@ -1165,14 +1165,14 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
             }
           } else {
             log.warn("Core {} is no longer the leader for {} {}  or we tried to put ourself into LIR, no request recovery command will be sent!"
-                , cloudDesc.getCoreNodeName(), collection, shardId);
+                , cloudDesc.getReplicaName(), collection, shardId);
           }
         }
       }
     }
     if (!replicasShouldBeInLowerTerms.isEmpty()) {
       zkController.getShardTerms(cloudDesc.getCollectionName(), cloudDesc.getShardId())
-          .ensureTermsIsHigher(cloudDesc.getCoreNodeName(), replicasShouldBeInLowerTerms);
+          .ensureTermsIsHigher(cloudDesc.getReplicaName(), replicasShouldBeInLowerTerms);
     }
     handleReplicationFactor();
     if (0 < errorsForClient.size()) {
diff --git a/solr/core/src/java/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.java
index 90edc57..e7c69eb 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.java
@@ -492,9 +492,9 @@ public final class DocExpirationUpdateProcessorFactory
       return false;
     }
     String leaderInCharge = firstSliceLeader.getName();
-    String myCoreNodeName = desc.getCoreNodeName();
+    String myReplicaName = desc.getReplicaName();
     
-    boolean inChargeOfDeletesRightNow = leaderInCharge.equals(myCoreNodeName);
+    boolean inChargeOfDeletesRightNow = leaderInCharge.equals(myReplicaName);
 
     if (previouslyInChargeOfDeletes && ! inChargeOfDeletesRightNow) {
       // don't spam the logs constantly, just log when we know that we're not the guy
diff --git a/solr/core/src/java/org/apache/solr/update/processor/ScriptEngineCustomizer.java b/solr/core/src/java/org/apache/solr/update/processor/ScriptEngineCustomizer.java
deleted file mode 100644
index f230526..0000000
--- a/solr/core/src/java/org/apache/solr/update/processor/ScriptEngineCustomizer.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.update.processor;
-
-import javax.script.ScriptEngine;
-
-/**
- * Enables customization of a script engine. Will mostly be used to register engine scoped variables.
- */
-public interface ScriptEngineCustomizer {
-
-  void customize(ScriptEngine engine);
-
-}
diff --git a/solr/core/src/java/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.java
deleted file mode 100644
index d2f5a07..0000000
--- a/solr/core/src/java/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.java
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.update.processor;
-
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrException.ErrorCode;
-import org.apache.solr.common.util.NamedList;
-import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.core.SolrCore;
-import org.apache.solr.core.SolrResourceLoader;
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.request.LocalSolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.update.*;
-import org.apache.solr.util.plugin.SolrCoreAware;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.FilenameUtils;
-
-import javax.script.Invocable;
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-import javax.script.ScriptEngineFactory;
-import javax.script.ScriptException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.lang.invoke.MethodHandles;
-import java.nio.charset.StandardCharsets;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.security.ProtectionDomain;
-import java.util.Set;
-import java.util.LinkedHashSet;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collection;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <p>
- * An update request processor factory that enables the use of update 
- * processors implemented as scripts which can be loaded by the 
- * {@link SolrResourceLoader} (usually via the <code>conf</code> dir for 
- * the SolrCore).
- * </p>
- * <p>
- * This factory requires at least one configuration parameter named
- * <code>script</code> which may be the name of a script file as a string, 
- * or an array of multiple script files.  If multiple script files are 
- * specified, they are executed sequentially in the order specified in the 
- * configuration -- as if multiple factories were configured sequentially
- * </p>
- * <p>
- * Each script file is expected to declare functions with the same name 
- * as each method in {@link UpdateRequestProcessor}, using the same 
- * arguments.  One slight deviation is in the optional return value from 
- * these functions: If a script function has a <code>boolean</code> return 
- * value, and that value is <code>false</code> then the processor will 
- * cleanly terminate processing of the command and return, without forwarding 
- * the command on to the next script or processor in the chain.
- * Due to limitations in the {@link ScriptEngine} API used by 
- * this factory, it can not enforce that all functions exist on initialization,
- * so errors from missing functions will only be generated at runtime when
- * the chain attempts to use them.
- * </p>
- * <p>
- * The factory may also be configured with an optional "params" argument, 
- * which can be an {@link NamedList} (or array, or any other simple Java 
- * object) which will be put into the global scope for each script.
- * </p>
- * <p>
- * The following variables are define as global variables for each script:
- * <ul>
- *  <li>req - The {@link SolrQueryRequest}</li>
- *  <li>rsp - The {@link SolrQueryResponse}</li>
- *  <li>logger - A {@link Logger} that can be used for logging purposes in the script</li>
- *  <li>params - The "params" init argument in the factory configuration (if any)</li>
- * </ul>
- * <p>
- * Internally this update processor uses JDK 6 scripting engine support, 
- * and any {@link Invocable} implementations of <code>ScriptEngine</code> 
- * that can be loaded using the Solr Plugin ClassLoader may be used.  
- * By default, the engine used for each script is determined by the filed 
- * extension (ie: a *.js file will be treated as a JavaScript script) but 
- * this can be overridden by specifying an explicit "engine" name init 
- * param for the factory, which identifies a registered name of a 
- * {@link ScriptEngineFactory}. 
- * (This may be particularly useful if multiple engines are available for 
- * the same scripting language, and you wish to force the usage of a 
- * particular engine because of known quirks)
- * </p>
- * <p>
- * A new {@link ScriptEngineManager} is created for each 
- * <code>SolrQueryRequest</code> defining a "global" scope for the script(s) 
- * which is request specific.  Separate <code>ScriptEngine</code> instances 
- * are then used to evaluate the script files, resulting in an "engine" scope 
- * that is specific to each script.
- * </p>
- * <p>
- * A simple example...
- * </p>
- * <pre class="prettyprint">
- * &lt;processor class="solr.StatelessScriptUpdateProcessorFactory"&gt;
- *   &lt;str name="script"&gt;updateProcessor.js&lt;/str&gt;
- * &lt;/processor&gt;
- * </pre>
- * <p>
- * A more complex example involving multiple scripts in different languages, 
- * and a "params" <code>NamedList</code> that will be put into the global 
- * scope of each script...
- * </p>
- * <pre class="prettyprint">
- * &lt;processor class="solr.StatelessScriptUpdateProcessorFactory"&gt;
- *   &lt;arr name="script"&gt;
- *     &lt;str name="script"&gt;first-processor.js&lt;/str&gt;
- *     &lt;str name="script"&gt;second-processor.py&lt;/str&gt;
- *   &lt;/arr&gt;
- *   &lt;lst name="params"&gt;
- *     &lt;bool name="a_bool_value"&gt;true&lt;/bool&gt;
- *     &lt;int name="and_int_value"&gt;3&lt;/int&gt;
- *   &lt;/lst&gt;
- * &lt;/processor&gt;
- * </pre>
- * <p>
- * An example where the script file extensions are ignored, and an 
- * explicit script engine is used....
- * </p>
- * <pre class="prettyprint">
- * &lt;processor class="solr.StatelessScriptUpdateProcessorFactory"&gt;
- *   &lt;arr name="script"&gt;
- *     &lt;str name="script"&gt;first-processor.txt&lt;/str&gt;
- *     &lt;str name="script"&gt;second-processor.txt&lt;/str&gt;
- *   &lt;/arr&gt;
- *   &lt;str name="engine"&gt;rhino&lt;/str&gt;
- * &lt;/processor&gt;
- * </pre>
- * 
- * @since 4.0.0
- */
-public class StatelessScriptUpdateProcessorFactory extends UpdateRequestProcessorFactory implements SolrCoreAware {
-
-  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-  private final static String SCRIPT_ARG = "script";
-  private final static String PARAMS_ARG = "params";
-  private final static String ENGINE_NAME_ARG = "engine";
-
-  private List<ScriptFile> scriptFiles;
-
-  /** if non null, this is an override for the engine for all scripts */
-  private String engineName = null;
-
-  private Object params = null;
-
-  private SolrResourceLoader resourceLoader;
-
-  private ScriptEngineCustomizer scriptEngineCustomizer;
-
-  @Override
-  public void init(@SuppressWarnings({"rawtypes"})NamedList args) {
-    @SuppressWarnings({"unchecked"})
-    Collection<String> scripts =
-      args.removeConfigArgs(SCRIPT_ARG);
-    if (scripts.isEmpty()) {
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                              "StatelessScriptUpdateProcessorFactory must be " +
-                              "initialized with at least one " + SCRIPT_ARG);
-    }
-    scriptFiles = new ArrayList<>();
-    for (String script : scripts) {
-      scriptFiles.add(new ScriptFile(script));
-    }
-
-    params = args.remove(PARAMS_ARG);
-
-    Object engine = args.remove(ENGINE_NAME_ARG);
-    if (engine != null) {
-      if (engine instanceof String) {
-        engineName = (String)engine;
-      } else {
-        throw new SolrException
-          (SolrException.ErrorCode.SERVER_ERROR, 
-           "'" + ENGINE_NAME_ARG + "' init param must be a String (found: " + 
-           engine.getClass() + ")");
-      }
-    }
-
-    super.init(args);
-
-  }
-
-  @Override
-  public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) {
-    List<EngineInfo> scriptEngines = null;
-
-    scriptEngines = initEngines(req, rsp);
-
-    return new ScriptUpdateProcessor(req, rsp, scriptEngines, next);
-  }
-
-  // TODO: Make this useful outside of tests, such that a ScriptEngineCustomizer could be looked up through the resource loader
-  void setScriptEngineCustomizer(ScriptEngineCustomizer scriptEngineCustomizer) {
-    this.scriptEngineCustomizer = scriptEngineCustomizer;
-  }
-
-  @Override
-  public void inform(SolrCore core) {
-    if (!core.getCoreDescriptor().isConfigSetTrusted()) {
-      throw new SolrException(ErrorCode.UNAUTHORIZED, "The configset for this collection was uploaded without any authentication in place,"
-          + " and this operation is not available for collections with untrusted configsets. To use this component, re-upload the configset"
-          + " after enabling authentication and authorization.");
-    }
-    resourceLoader = core.getResourceLoader();
-
-    // test that our engines & scripts are valid
-
-    SolrQueryResponse rsp = new SolrQueryResponse();
-    SolrQueryRequest req = new LocalSolrQueryRequest(core, new ModifiableSolrParams());
-    try {
-      initEngines(req, rsp);
-    } catch (Exception e) {
-      String msg = "Unable to initialize scripts: " + e.getMessage();
-      log.error(msg, e);
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, msg, e);
-    } finally {
-      req.close();
-    }
-
-    
-  }
-
-
-  //================================================ Helper Methods ==================================================
-
-  /**
-   * Initializes a list of script engines - an engine per script file.
-   *
-   * @param req The solr request.
-   * @param rsp The solr response
-   * @return The list of initialized script engines.
-   */
-  private List<EngineInfo> initEngines(SolrQueryRequest req, 
-                                       SolrQueryResponse rsp) 
-    throws SolrException {
-    
-    List<EngineInfo> scriptEngines = new ArrayList<>();
-
-    ScriptEngineManager scriptEngineManager 
-      = new ScriptEngineManager(resourceLoader.getClassLoader());
-
-    scriptEngineManager.put("logger", log);
-    scriptEngineManager.put("req", req);
-    scriptEngineManager.put("rsp", rsp);
-    if (params != null) {
-      scriptEngineManager.put("params", params);
-    }
-
-    for (ScriptFile scriptFile : scriptFiles) {
-      final ScriptEngine engine;
-      if (null != engineName) {
-        engine = scriptEngineManager.getEngineByName(engineName);
-        if (engine == null) {
-          String details = getSupportedEngines(scriptEngineManager, false);
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                                  "No ScriptEngine found by name: "
-                                  + engineName + 
-                                  (null != details ? 
-                                   " -- supported names: " + details : ""));
-        }
-      } else {
-        engine = scriptEngineManager.getEngineByExtension
-          (scriptFile.getExtension());
-        if (engine == null) {
-          String details = getSupportedEngines(scriptEngineManager, true);
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                                  "No ScriptEngine found by file extension: "
-                                  + scriptFile.getFileName() + 
-                                  (null != details ? 
-                                   " -- supported extensions: " + details : ""));
-                                  
-        }
-      }
-
-      if (! (engine instanceof Invocable)) {
-        String msg = 
-          "Engine " + ((null != engineName) ? engineName : 
-                       ("for script " + scriptFile.getFileName())) +
-          " does not support function invocation (via Invocable): " +
-          engine.getClass().toString() + " (" +
-          engine.getFactory().getEngineName() + ")";
-        log.error(msg);
-        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, msg);
-      }
-
-      if (scriptEngineCustomizer != null) {
-        scriptEngineCustomizer.customize(engine);
-      }
-
-      scriptEngines.add(new EngineInfo((Invocable)engine, scriptFile));
-      try {
-        Reader scriptSrc = scriptFile.openReader(resourceLoader);
-  
-        try {
-          try {
-            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
-              @Override
-              public Void run() throws ScriptException  {
-                engine.eval(scriptSrc);
-                return null;
-              }
-            }, SCRIPT_SANDBOX);
-          } catch (PrivilegedActionException e) {
-            throw (ScriptException) e.getException();
-          }
-        } catch (ScriptException e) {
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                                  "Unable to evaluate script: " + 
-                                  scriptFile.getFileName(), e);
-        } finally {
-          IOUtils.closeQuietly(scriptSrc);
-        }
-      } catch (IOException ioe) {
-        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-            "Unable to evaluate script: " + 
-            scriptFile.getFileName(), ioe);        
-      }
-    }
-    return scriptEngines;
-  }
-
-  /**
-   * For error messages - returns null if there are any exceptions of any 
-   * kind building the string (or of the list is empty for some unknown reason).
-   * @param ext - if true, list of extensions, otherwise a list of engine names
-   */
-  private static String getSupportedEngines(ScriptEngineManager mgr,
-                                            boolean ext) {
-    String result = null;
-    try {
-      List<ScriptEngineFactory> factories = mgr.getEngineFactories();
-      if (null == factories) return result;
-
-      Set<String> engines = new LinkedHashSet<>(factories.size());
-      for (ScriptEngineFactory f : factories) {
-        if (ext) {
-          engines.addAll(f.getExtensions());
-        } else {
-          engines.addAll(f.getNames());
-        }
-      }
-      result = String.join(", ", engines);
-    } catch (RuntimeException e) {
-      /* :NOOP: */
-    }
-    return result;
-  }
-
-
-
-  //================================================= Inner Classes ==================================================
-
-  /**
-   * The actual update processor. All methods delegate to scripts.
-   */
-  private static class ScriptUpdateProcessor extends UpdateRequestProcessor {
-
-    private List<EngineInfo> engines;
-
-    private ScriptUpdateProcessor(SolrQueryRequest req, SolrQueryResponse res, List<EngineInfo> engines, UpdateRequestProcessor next) {
-      super(next);
-      this.engines = engines;
-    }
-
-    @Override
-    public void processAdd(AddUpdateCommand cmd) throws IOException {
-      if (invokeFunction("processAdd", cmd)) {
-        super.processAdd(cmd);
-      }
-    }
-
-    @Override
-    public void processDelete(DeleteUpdateCommand cmd) throws IOException {
-      if (invokeFunction("processDelete", cmd)) {
-        super.processDelete(cmd);
-      }
-        
-    }
-
-    @Override
-    public void processMergeIndexes(MergeIndexesCommand cmd) throws IOException {
-      if (invokeFunction("processMergeIndexes", cmd)) {
-        super.processMergeIndexes(cmd);
-      }
-    }
-
-    @Override
-    public void processCommit(CommitUpdateCommand cmd) throws IOException {
-      if (invokeFunction("processCommit", cmd)) {
-        super.processCommit(cmd);
-      }
-    }
-
-    @Override
-    public void processRollback(RollbackUpdateCommand cmd) throws IOException {
-      if (invokeFunction("processRollback", cmd)) {
-        super.processRollback(cmd);
-      }
-    }
-
-    @Override
-    public void finish() throws IOException {
-      if (invokeFunction("finish")) {
-        super.finish();
-      }
-    }
-
-    /**
-     * returns true if processing should continue, or false if the 
-     * request should be ended now.  Result value is computed from the return 
-     * value of the script function if: it exists, is non-null, and can be 
-     * cast to a java Boolean.
-     */
-    private boolean invokeFunction(String name, Object... cmd) {
-      return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
-        @Override
-        public Boolean run() {
-          return invokeFunctionUnsafe(name, cmd);
-        }
-      }, SCRIPT_SANDBOX);
-    }
-
-    private boolean invokeFunctionUnsafe(String name, Object... cmd) {
-
-      for (EngineInfo engine : engines) {
-        try {
-          Object result = engine.getEngine().invokeFunction(name, cmd);
-          if (null != result && result instanceof Boolean) {
-            if (! ((Boolean)result).booleanValue() ) {
-              return false;
-            }
-          }
-
-        } catch (ScriptException | NoSuchMethodException e) {
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
-                                  "Unable to invoke function " + name + 
-                                  " in script: " + 
-                                  engine.getScriptFile().getFileName() + 
-                                  ": " + e.getMessage(), e);
-        }
-      }
-
-      return true;
-    }
-  }
-
-  /**
-   * Holds the script engine and its associated script file.
-   */
-  private static class EngineInfo {
-
-    private final Invocable engine;
-    private final ScriptFile scriptFile;
-
-    private EngineInfo(Invocable engine, ScriptFile scriptFile) {
-      this.engine = engine;
-      this.scriptFile = scriptFile;
-    }
-
-    public Invocable getEngine() {
-      return engine;
-    }
-
-    public ScriptFile getScriptFile() {
-      return scriptFile;
-    }
-  }
-
-  /**
-   * Represents a script file.
-   */
-  private static class ScriptFile {
-
-    private final String fileName;
-    private final String extension;
-
-    private ScriptFile(String fileName) {
-      this.fileName = fileName;
-      this.extension = FilenameUtils.getExtension(fileName);
-    }
-
-    public String getFileName() {
-      return fileName;
-    }
-
-    public String getExtension() {
-      return extension;
-    }
-
-    public Reader openReader(SolrResourceLoader resourceLoader) throws IOException {
-      InputStream input = resourceLoader.openResource(fileName);
-      return org.apache.lucene.util.IOUtils.getDecodingReader
-        (input, StandardCharsets.UTF_8);
-    }
-  }
-
-  // sandbox for script code: zero permissions
-  private static final AccessControlContext SCRIPT_SANDBOX =
-      new AccessControlContext(new ProtectionDomain[] { new ProtectionDomain(null, null) });
-}
diff --git a/solr/core/src/java/org/apache/solr/util/SolrLogLayout.java b/solr/core/src/java/org/apache/solr/util/SolrLogLayout.java
index 0280eee..f60bb05 100644
--- a/solr/core/src/java/org/apache/solr/util/SolrLogLayout.java
+++ b/solr/core/src/java/org/apache/solr/util/SolrLogLayout.java
@@ -241,7 +241,7 @@ public class SolrLogLayout extends AbstractStringLayout {
   private Map<String, Object> getReplicaProps(ZkController zkController, SolrCore core) {
     final String collectionName = core.getCoreDescriptor().getCloudDescriptor().getCollectionName();
     DocCollection collection = zkController.getClusterState().getCollectionOrNull(collectionName);
-    Replica replica = collection.getReplica(zkController.getCoreNodeName(core.getCoreDescriptor()));
+    Replica replica = collection.getReplica(zkController.getReplicaName(core.getCoreDescriptor()));
     if (replica != null) {
       return replica.getProperties();
     }
diff --git a/solr/core/src/test-files/solr/collection1/conf/addfields.updateprocessor.js b/solr/core/src/test-files/solr/collection1/conf/addfields.updateprocessor.js
deleted file mode 100644
index 1b3c9fc..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/addfields.updateprocessor.js
+++ /dev/null
@@ -1,26 +0,0 @@
-function processAdd(cmd) {
-    // Integer.valueOf is needed here to get a tru java object, because 
-    // all javascript numbers are floating point (ie: java.lang.Double)
-    cmd.getSolrInputDocument().addField("script_added_i", 
-                                        java.lang.Integer.valueOf(42));
-    cmd.getSolrInputDocument().addField("script_added_d", 42.3);
-    
-}
-
-// // // 
-
-function processDelete() {
-    // NOOP
-}
-function processCommit() { 
-    // NOOP
-}
-function processRollback() {
-    // NOOP
-}
-function processMergeIndexes() {
-    // NOOP
-}
-function finish() { 
-    // NOOP
-}
diff --git a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-bogus-scriptengine-name.xml b/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-bogus-scriptengine-name.xml
deleted file mode 100644
index ded7416..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-bogus-scriptengine-name.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<config>
-
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-
-  <updateRequestProcessorChain name="force-script-engine" default="true">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="engine">giberish</str>
-      <str name="script">missleading.extension.updateprocessor.js.txt</str>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-invalid-scriptfile.xml b/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-invalid-scriptfile.xml
deleted file mode 100644
index 709774d..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-invalid-scriptfile.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<config>
-
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-
-  <updateRequestProcessorChain name="force-script-engine" default="true">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="engine">javascript</str>
-      <!-- not parsable as javascript -->
-      <str name="script">currency.xml</str>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-missing-scriptfile.xml b/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-missing-scriptfile.xml
deleted file mode 100644
index d13ba0b..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/bad-solrconfig-missing-scriptfile.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<config>
-
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-
-  <updateRequestProcessorChain name="force-script-engine" default="true">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">a-file-name-that-does-not-exist.js</str>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/conditional.updateprocessor.js b/solr/core/src/test-files/solr/collection1/conf/conditional.updateprocessor.js
deleted file mode 100644
index 5ec9487..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/conditional.updateprocessor.js
+++ /dev/null
@@ -1,25 +0,0 @@
-function processAdd(cmd) {
-  if (req.getParams().getBool("go-for-it",false)) {
-    cmd.getSolrInputDocument().addField("script_added_s", "i went for it");
-    return true;
-  }
-  return false;
-}
-
-// // // 
-
-function processDelete() {
-    // NOOP
-}
-function processCommit() { 
-    // NOOP
-}
-function processRollback() {
-    // NOOP
-}
-function processMergeIndexes() {
-    // NOOP
-}
-function finish() { 
-    // NOOP
-}
diff --git a/solr/core/src/test-files/solr/collection1/conf/cross-compatible.js b/solr/core/src/test-files/solr/collection1/conf/cross-compatible.js
deleted file mode 100644
index 2fcd6c3..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/cross-compatible.js
+++ /dev/null
@@ -1,53 +0,0 @@
-function get_class(name) {
-   var clazz;
-   try {
-     // Java8 Nashorn
-     clazz = eval("Java.type(name).class");
-   } catch(e) {
-     // Java7 Rhino
-     clazz = eval("Packages."+name);
-   }
-
-   return clazz;
-}
-
-function processAdd(cmd) {
-  var doc = cmd.getSolrInputDocument();
-
-  var analyzer =
-       req.getCore().getLatestSchema()
-       .getFieldTypeByName("text")
-       .getIndexAnalyzer();
-
-  var token_stream =
-       analyzer.tokenStream("subject", doc.getFieldValue("subject"));
-
-  var cta_class = get_class("org.apache.lucene.analysis.tokenattributes.CharTermAttribute");
-  var term_att = token_stream.getAttribute(cta_class);
-  token_stream.reset();
-  while (token_stream.incrementToken()) {
-    doc.addField("term_s", term_att.toString());
-  }
-  token_stream.end();
-  token_stream.close();
-
-  return true;
-}
-
-// // //
-
-function processDelete() {
-    // NOOP
-}
-function processCommit() {
-    // NOOP
-}
-function processRollback() {
-    // NOOP
-}
-function processMergeIndexes() {
-    // NOOP
-}
-function finish() {
-    // NOOP
-}
diff --git a/solr/core/src/test-files/solr/collection1/conf/evil.js b/solr/core/src/test-files/solr/collection1/conf/evil.js
deleted file mode 100644
index d494814..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/evil.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var sys = Packages.java.lang.System;
-
-function processAdd(cmd) {
-  sys.getProperty("os.name");
-}
-
-function processDelete(cmd) {
-}
-
-function processMergeIndexes(cmd) {
-}
-
-function processCommit(cmd) {
-}
-
-function processRollback(cmd) {
-}
-
-function finish() {
-}
-
diff --git a/solr/core/src/test-files/solr/collection1/conf/missing.functions.updateprocessor.js b/solr/core/src/test-files/solr/collection1/conf/missing.functions.updateprocessor.js
deleted file mode 100644
index 6e8728a..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/missing.functions.updateprocessor.js
+++ /dev/null
@@ -1,3 +0,0 @@
-function doSomeStuff() {
-  return "This script doesn't contain any update processor functions";
-}
diff --git a/solr/core/src/test-files/solr/collection1/conf/missleading.extension.updateprocessor.js.txt b/solr/core/src/test-files/solr/collection1/conf/missleading.extension.updateprocessor.js.txt
deleted file mode 100644
index 984e1d8..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/missleading.extension.updateprocessor.js.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-function processAdd(cmd) {
-    // Integer.valueOf is needed here to get a tru java object, because 
-    // all javascript numbers are floating point (ie: java.lang.Double)
-    cmd.getSolrInputDocument().addField("script_added_i", 
-                                        java.lang.Integer.valueOf(42));
-    cmd.getSolrInputDocument().addField("script_added_d", 42.3);
-    
-}
-function processDelete() {
-    // NOOP
-}
-function processCommit() { 
-    // NOOP
-}
-function processRollback() {
-    // NOOP
-}
-function processMergeIndexes() {
-    // NOOP
-}
-function finish() { 
-    // NOOP
-}
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml
deleted file mode 100644
index 74f00fd..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!--
-   Test Config that for ScriptUpdateProcessor
-
-  -->
-<config>
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-  <requestHandler name="/select" class="solr.SearchHandler"></requestHandler>
-  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-  <updateRequestProcessorChain name="force-script-engine" default="true">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="engine">javascript</str>
-      <str name="script">missleading.extension.updateprocessor.js.txt</str>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="run-no-scripts">
-    <!-- for bypassing all scripts -->
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="single-script">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">trivial.updateprocessor0.js</str>
-      <lst name="params">
-        <bool name="boolValue">true</bool>
-        <int name="intValue">1</int>
-      </lst>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="dual-scripts-arr">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <arr name="script">
-        <str>trivial.updateprocessor0.js</str>
-        <str>trivial.updateprocessor1.js</str>
-      </arr>
-      <lst name="params">
-        <bool name="boolValue">true</bool>
-        <int name="intValue">1</int>
-      </lst>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="dual-scripts-strs">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">trivial.updateprocessor0.js</str>
-      <str name="script">trivial.updateprocessor1.js</str>
-      <lst name="params">
-        <bool name="boolValue">true</bool>
-        <int name="intValue">1</int>
-      </lst>
-    </processor>
-    <processor class="solr.RunUpdateProcessorFactory" />
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="conditional-scripts">
-    <!-- multiple scripts, 
-         test that the first one can conditionally stop execution -->
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">conditional.updateprocessor.js</str>
-      <str name="script">addfields.updateprocessor.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="conditional-script">
-    <!-- single script, followed by another processor 
-         (that happens to be a script). 
-         test that the first one can conditionally stop execution -->
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">conditional.updateprocessor.js</str>
-    </processor>
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">addfields.updateprocessor.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="error-on-add">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">throw.error.on.add.updateprocessor.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="missing-functions">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">missing.functions.updateprocessor.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="javascript-compatibility">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">cross-compatible.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="evil">
-    <processor class="solr.StatelessScriptUpdateProcessorFactory">
-      <str name="script">evil.js</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/throw.error.on.add.updateprocessor.js b/solr/core/src/test-files/solr/collection1/conf/throw.error.on.add.updateprocessor.js
deleted file mode 100644
index ca56fe3..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/throw.error.on.add.updateprocessor.js
+++ /dev/null
@@ -1,21 +0,0 @@
-function processAdd() {
-  throw "guess what? no-soup-fo-you !!!";
-}
-
-// // // 
-
-function processDelete() {
-    // NOOP
-}
-function processCommit() { 
-    // NOOP
-}
-function processRollback() {
-    // NOOP
-}
-function processMergeIndexes() {
-    // NOOP
-}
-function finish() { 
-    // NOOP
-}
diff --git a/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor0.js b/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor0.js
deleted file mode 100644
index b1856b1..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor0.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var Assert = Packages.org.junit.Assert;
-
-function processAdd(cmd) {
-    functionMessages.add("processAdd0");
-    Assert.assertNotNull(req);
-    Assert.assertNotNull(rsp);
-    Assert.assertNotNull(logger);
-    Assert.assertNotNull(cmd);
-    Assert.assertNotNull(params);
-    Assert.assertTrue(1 == params.get('intValue').intValue());  // had issues with assertTrue(1, params.get('intValue').intValue()) casting to wrong variant
-    Assert.assertTrue(params.get('boolValue').booleanValue());
-
-    // Integer.valueOf is needed here to get a tru java object, because 
-    // all javascript numbers are floating point (ie: java.lang.Double)
-    cmd.getSolrInputDocument().addField("script_added_i", 
-                                        java.lang.Integer.valueOf(42));
-    cmd.getSolrInputDocument().addField("script_added_d", 42.3);
-    
-}
-
-function processDelete(cmd) {
-    functionMessages.add("processDelete0");
-    Assert.assertNotNull(req);
-    Assert.assertNotNull(rsp);
-    Assert.assertNotNull(logger);
-    Assert.assertNotNull(cmd);
-}
-
-function processMergeIndexes(cmd) {
-    functionMessages.add("processMergeIndexes0");
-    Assert.assertNotNull(req);
-    Assert.assertNotNull(rsp);
-    Assert.assertNotNull(logger);
-    Assert.assertNotNull(cmd);
-}
-
-function processCommit(cmd) {
-    functionMessages.add("processCommit0");
-    Assert.assertNotNull(req);
-    Assert.assertNotNull(rsp);
-    Assert.assertNotNull(logger);
-    Assert.assertNotNull(cmd);
-}
-
-function processRollback(cmd) {
-    functionMessages.add("processRollback0");
-    Assert.assertNotNull(req);
-    Assert.assertNotNull(rsp);
-    Assert.assertNotNull(logger);
-    Assert.assertNotNull(cmd);
-}
-
-function finish() {
-    functionMessages.add("finish0");
-    Assert.assertNotNull(req);
-    Assert.assertNotNull(rsp);
-    Assert.assertNotNull(logger);
-}
-
diff --git a/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor1.js b/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor1.js
deleted file mode 100644
index 98bdf2a..0000000
--- a/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor1.js
+++ /dev/null
@@ -1,25 +0,0 @@
-function processAdd(cmd) {
-    functionMessages.add("processAdd1");
-    
-}
-
-function processDelete(cmd) {
-    functionMessages.add("processDelete1");
-}
-
-function processMergeIndexes(cmd) {
-    functionMessages.add("processMergeIndexes1");
-}
-
-function processCommit(cmd) {
-    functionMessages.add("processCommit1");
-}
-
-function processRollback(cmd) {
-    functionMessages.add("processRollback1");
-}
-
-function finish() {
-    functionMessages.add("finish1");
-}
-
diff --git a/solr/core/src/test-files/solr/configsets/upload/with-script-processor/missleading.extension.updateprocessor.js.txt b/solr/core/src/test-files/solr/configsets/upload/with-script-processor/missleading.extension.updateprocessor.js.txt
deleted file mode 100644
index 984e1d8..0000000
--- a/solr/core/src/test-files/solr/configsets/upload/with-script-processor/missleading.extension.updateprocessor.js.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-function processAdd(cmd) {
-    // Integer.valueOf is needed here to get a tru java object, because 
-    // all javascript numbers are floating point (ie: java.lang.Double)
-    cmd.getSolrInputDocument().addField("script_added_i", 
-                                        java.lang.Integer.valueOf(42));
-    cmd.getSolrInputDocument().addField("script_added_d", 42.3);
-    
-}
-function processDelete() {
-    // NOOP
-}
-function processCommit() { 
-    // NOOP
-}
-function processRollback() {
-    // NOOP
-}
-function processMergeIndexes() {
-    // NOOP
-}
-function finish() { 
-    // NOOP
-}
diff --git a/solr/core/src/test-files/solr/configsets/upload/with-script-processor/solrconfig.xml b/solr/core/src/test-files/solr/configsets/upload/with-script-processor/solrconfig.xml
index 1c62889..affccbf 100644
--- a/solr/core/src/test-files/solr/configsets/upload/with-script-processor/solrconfig.xml
+++ b/solr/core/src/test-files/solr/configsets/upload/with-script-processor/solrconfig.xml
@@ -37,12 +37,9 @@
 
   <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
 
-  <updateHandler class="solr.DirectUpdateHandler2">
-    <commitWithin>
-      <softCommit>${solr.commitwithin.softcommit:true}</softCommit>
-    </commitWithin>
+  <lib dir="${solr.install.dir:../../../../../}/contrib/scripting/build/libs/" regex="solr-scripting-\d.*\.jar" />
+
 
-  </updateHandler>
   <requestHandler name="/select" class="solr.SearchHandler">
     <lst name="defaults">
       <str name="echoParams">explicit</str>
@@ -55,11 +52,10 @@
   <updateRequestProcessorChain name="force-script-engine" default="true">
     <processor class="solr.StatelessScriptUpdateProcessorFactory">
       <str name="engine">javascript</str>
-      <str name="script">missleading.extension.updateprocessor.js.txt</str>
+      <str name="script">trivial.updateprocessor.js</str>
     </processor>
     <processor class="solr.RunUpdateProcessorFactory" />
   </updateRequestProcessorChain>
 
   <requestHandler name="/update" class="solr.UpdateRequestHandler"  />
 </config>
-
diff --git a/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java b/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
index 37062e6..5480eff 100644
--- a/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
@@ -58,7 +58,7 @@ public class AssignBackwardCompatibilityTest extends SolrCloudTestCase {
   @Test
   public void test() throws IOException, SolrServerException, KeeperException, InterruptedException {
     Set<String> coreNames = new HashSet<>();
-    Set<String> coreNodeNames = new HashSet<>();
+    Set<String> replicaNames = new HashSet<>();
 
     int numOperations = random().nextInt(15) + 15;
     int numLiveReplicas = 4;
@@ -97,9 +97,9 @@ public class AssignBackwardCompatibilityTest extends SolrCloudTestCase {
         Replica newReplica = getCollectionState(COLLECTION).getReplicas().stream()
             .filter(r -> r.getCoreName().equals(coreName))
             .findAny().get();
-        String coreNodeName = newReplica.getName();
-        assertFalse("Core node name is not unique", coreNodeNames.contains(coreName));
-        coreNodeNames.add(coreNodeName);
+        String replicaName = newReplica.getName();
+        assertFalse("Core node name is not unique", replicaNames.contains(coreName));
+        replicaNames.add(replicaName);
       }
     }
   }
diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
index 227e50e..a7d4c1d 100644
--- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
@@ -1167,7 +1167,7 @@ public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {
 
         if (random().nextBoolean()) {
           // sometimes we use an explicit core node name
-          createCmd.setCoreNodeName("anode" + nodeCounter.incrementAndGet());
+          createCmd.setReplicaName("anode" + nodeCounter.incrementAndGet());
         }
 
         if (shardId == null) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java
index 325c5fb..667ecfe 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteInactiveReplicaTest.java
@@ -92,7 +92,7 @@ public class DeleteInactiveReplicaTest extends SolrCloudTestCase {
     timeOut.waitFor("Expected data dir and instance dir of " + replica.getName() + " is deleted", ()
         -> !Files.exists(replicaCd.getInstanceDir()) && !FileUtils.fileExists(replicaCd.getDataDir()));
 
-    // Check that we can't create a core with no coreNodeName
+    // Check that we can't create a core with no replicaName
     try (SolrClient queryClient = getHttpSolrClient(jetty.getBaseUrl().toString())) {
       Exception e = expectThrows(Exception.class, () -> {
         CoreAdminRequest.Create createRequest = new CoreAdminRequest.Create();
@@ -101,7 +101,7 @@ public class DeleteInactiveReplicaTest extends SolrCloudTestCase {
         createRequest.setShardId("shard2");
         queryClient.request(createRequest);
       });
-      assertTrue("Unexpected error message: " + e.getMessage(), e.getMessage().contains("coreNodeName missing"));
+      assertTrue("Unexpected error message: " + e.getMessage(), e.getMessage().contains("replicaName missing"));
 
     }
   }
diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
index e721517..c47a480 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java
@@ -293,7 +293,7 @@ public class DeleteReplicaTest extends SolrCloudTestCase {
     AtomicInteger times = new AtomicInteger(0);
     ZkContainer.testing_beforeRegisterInZk = cd -> {
       if (cd.getCloudDescriptor() == null) return false;
-      if (replica1.getName().equals(cd.getCloudDescriptor().getCoreNodeName())
+      if (replica1.getName().equals(cd.getCloudDescriptor().getReplicaName())
           && collectionName.equals(cd.getCloudDescriptor().getCollectionName())) {
         if (times.incrementAndGet() > 1) {
           return false;
diff --git a/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java b/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
index 027af11..0bd5efd 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DistribDocExpirationUpdateProcessorTest.java
@@ -269,7 +269,7 @@ public class DistribDocExpirationUpdateProcessorTest extends SolrCloudTestCase {
   }
 
   /**
-   * returns a map whose key is the coreNodeName and whose value is data about that core needed for the test
+   * returns a map whose key is the replicaName and whose value is data about that core needed for the test
    */
   private Map<String,ReplicaData> getTestDataForAllReplicas() throws IOException, SolrServerException {
     Map<String,ReplicaData> results = new HashMap<>();
diff --git a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
index 081ed52..559712b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
@@ -412,7 +412,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
     // cause leader migration by expiring the current leader's zk session
     chaosMonkey.expireSession(leaderJetty);
 
-    String expectedNewLeaderCoreNodeName = notLeaders.get(0).getName();
+    String expectedNewLeaderReplicaName = notLeaders.get(0).getName();
     long timeout = System.nanoTime() + TimeUnit.NANOSECONDS.convert(60, TimeUnit.SECONDS);
     while (System.nanoTime() < timeout) {
       String currentLeaderName = null;
@@ -422,7 +422,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
         currentLeaderName = currentLeader.getName();
       } catch (Exception exc) {}
 
-      if (expectedNewLeaderCoreNodeName.equals(currentLeaderName))
+      if (expectedNewLeaderReplicaName.equals(currentLeaderName))
         break; // new leader was elected after zk session expiration
 
       Thread.sleep(500);
@@ -430,7 +430,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
 
     Replica currentLeader =
         cloudClient.getZkStateReader().getLeaderRetry(testCollectionName, "shard1");
-    assertEquals(expectedNewLeaderCoreNodeName, currentLeader.getName());
+    assertEquals(expectedNewLeaderReplicaName, currentLeader.getName());
 
     // TODO: This test logic seems to be timing dependent and fails on Jenkins
     // need to come up with a better approach
diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderElectionContextKeyTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderElectionContextKeyTest.java
index ee74f68..3f55aa1 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LeaderElectionContextKeyTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LeaderElectionContextKeyTest.java
@@ -49,7 +49,7 @@ public class LeaderElectionContextKeyTest extends SolrCloudTestCase {
 
     for (int i = 1; i <= 2; i++) {
       // Create two collections with same order of requests, no parallel
-      // therefore Assign.buildCoreNodeName will create same coreNodeName
+      // therefore Assign.buildReplicaName will create same coreNodeName
       CollectionAdminRequest
           .createCollection("testCollection"+i, "config", 2, 1)
           .setCreateNodeSet("")
diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
index 294f7c2..97925bd 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
@@ -89,9 +89,9 @@ public class LeaderElectionTest extends SolrTestCaseJ4 {
     private long runLeaderDelay = 0;
 
     public TestLeaderElectionContext(LeaderElector leaderElector,
-        String shardId, String collection, String coreNodeName, ZkNodeProps props,
+        String shardId, String collection, String replicaName, ZkNodeProps props,
         ZkController zkController, long runLeaderDelay) {
-      super (leaderElector, shardId, collection, coreNodeName, props, zkController);
+      super (leaderElector, shardId, collection, replicaName, props, zkController);
       this.runLeaderDelay = runLeaderDelay;
     }
 
diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderFailureAfterFreshStartTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderFailureAfterFreshStartTest.java
index 8cb40dd..a2c7e10 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LeaderFailureAfterFreshStartTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LeaderFailureAfterFreshStartTest.java
@@ -106,9 +106,9 @@ public class LeaderFailureAfterFreshStartTest extends AbstractFullDistribZkTestB
       CloudJettyRunner initialLeaderJetty = shardToLeaderJetty.get("shard1");
       List<CloudJettyRunner> otherJetties = getOtherAvailableJetties(initialLeaderJetty);
       
-      log.info("Leader node_name: {},  url: {}", initialLeaderJetty.coreNodeName, initialLeaderJetty.url);
+      log.info("Leader node_name: {},  url: {}", initialLeaderJetty.replicaName, initialLeaderJetty.url);
       for (CloudJettyRunner cloudJettyRunner : otherJetties) {
-        log.info("Nonleader node_name: {},  url: {}", cloudJettyRunner.coreNodeName, cloudJettyRunner.url);
+        log.info("Nonleader node_name: {},  url: {}", cloudJettyRunner.replicaName, cloudJettyRunner.url);
       }
       
       CloudJettyRunner secondNode = otherJetties.get(0);
@@ -212,7 +212,7 @@ public class LeaderFailureAfterFreshStartTest extends AbstractFullDistribZkTestB
       boolean allActive = true;
 
       Collection<String> nodesDownNames = nodesDown.stream()
-          .map(n -> n.coreNodeName)
+          .map(n -> n.replicaName)
           .collect(Collectors.toList());
       
       Collection<Replica> replicasToCheck = null;
diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
index 1632617..c57caa4 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
@@ -192,7 +192,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
       q.offer(Utils.toJSON(m));
     }
 
-    public String publishState(String collection, String coreName, String coreNodeName, String shard, Replica.State stateName, int numShards, boolean startElection, Overseer overseer)
+    public String publishState(String collection, String coreName, String replicaName, String shard, Replica.State stateName, int numShards, boolean startElection, Overseer overseer)
         throws Exception {
       if (stateName == null) {
         ElectionContext ec = electionContext.remove(coreName);
@@ -202,7 +202,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
         ZkNodeProps m = new ZkNodeProps(Overseer.QUEUE_OPERATION, OverseerAction.DELETECORE.toLower(),
             ZkStateReader.NODE_NAME_PROP, nodeName,
             ZkStateReader.CORE_NAME_PROP, coreName,
-            ZkStateReader.CORE_NODE_NAME_PROP, coreNodeName,
+            ZkStateReader.CORE_NODE_NAME_PROP, replicaName,
             ZkStateReader.COLLECTION_PROP, collection);
         ZkDistributedQueue q = overseer.getStateUpdateQueue();
         q.offer(Utils.toJSON(m));
@@ -212,7 +212,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
             ZkStateReader.STATE_PROP, stateName.toString(),
             ZkStateReader.NODE_NAME_PROP, nodeName,
             ZkStateReader.CORE_NAME_PROP, coreName,
-            ZkStateReader.CORE_NODE_NAME_PROP, coreNodeName,
+            ZkStateReader.CORE_NODE_NAME_PROP, replicaName,
             ZkStateReader.COLLECTION_PROP, collection,
             ZkStateReader.SHARD_ID_PROP, shard,
             ZkStateReader.NUM_SHARDS_PROP, Integer.toString(numShards));
@@ -222,8 +222,8 @@ public class OverseerTest extends SolrTestCaseJ4 {
 
       if (startElection && collection.length() > 0) {
         zkStateReader.waitForState(collection, 45000, TimeUnit.MILLISECONDS,
-            (liveNodes, collectionState) -> getShardId(collectionState, coreNodeName) != null);
-        String shardId = getShardId(collection, coreNodeName);
+            (liveNodes, collectionState) -> getShardId(collectionState, replicaName) != null);
+        String shardId = getShardId(collection, replicaName);
         if (shardId != null) {
           ElectionContext prevContext = electionContext.get(coreName);
           if (prevContext != null) {
@@ -238,7 +238,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
               ZkStateReader.CORE_NAME_PROP, coreName,
               ZkStateReader.SHARD_ID_PROP, shardId,
               ZkStateReader.COLLECTION_PROP, collection,
-              ZkStateReader.CORE_NODE_NAME_PROP, coreNodeName);
+              ZkStateReader.CORE_NODE_NAME_PROP, replicaName);
           LeaderElector elector = new LeaderElector(zkClient);
           ShardLeaderElectionContextBase ctx = new ShardLeaderElectionContextBase(
               elector, shardId, collection, nodeName + coreName, props,
@@ -252,19 +252,19 @@ public class OverseerTest extends SolrTestCaseJ4 {
       return null;
     }
 
-    private String getShardId(String collection, String coreNodeName) {
+    private String getShardId(String collection, String replicaName) {
       DocCollection dc = zkStateReader.getClusterState().getCollectionOrNull(collection);
-      return getShardId(dc, coreNodeName);
+      return getShardId(dc, replicaName);
     }
 
-    private String getShardId(DocCollection collection, String coreNodeName) {
+    private String getShardId(DocCollection collection, String replicaName) {
       if (collection == null) return null;
       Map<String,Slice> slices = collection.getSlicesMap();
       if (slices != null) {
         for (Slice slice : slices.values()) {
           for (Replica replica : slice.getReplicas()) {
             String cnn = replica.getName();
-            if (coreNodeName.equals(cnn)) {
+            if (replicaName.equals(cnn)) {
               return slice.getName();
             }
           }
diff --git a/solr/core/src/test/org/apache/solr/cloud/PeerSyncReplicationTest.java b/solr/core/src/test/org/apache/solr/cloud/PeerSyncReplicationTest.java
index c20e3eb..0155de2 100644
--- a/solr/core/src/test/org/apache/solr/cloud/PeerSyncReplicationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/PeerSyncReplicationTest.java
@@ -345,7 +345,7 @@ public class PeerSyncReplicationTest extends AbstractFullDistribZkTestBase {
 
       Collection<String> nodesDownNames =
           nodesDown.stream()
-              .map(n -> n.coreNodeName)
+              .map(n -> n.replicaName)
               .collect(Collectors.toList());
 
       Collection<Replica> replicasToCheck =
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java
index 247313e..5a45110 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java
@@ -52,7 +52,7 @@ import org.slf4j.LoggerFactory;
  */
 @LogLevel("org.apache.solr.cloud.overseer.*=DEBUG,org.apache.solr.cloud.Overseer=DEBUG,org.apache.solr.cloud.ZkController=DEBUG")
 public class TestCloudSearcherWarming extends SolrCloudTestCase {
-  public static final AtomicReference<String> coreNodeNameRef = new AtomicReference<>(null),
+  public static final AtomicReference<String> replicaNameRef = new AtomicReference<>(null),
       coreNameRef = new AtomicReference<>(null);
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   private static final AtomicInteger sleepTime = new AtomicInteger(-1);
@@ -72,7 +72,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
   @Override
   public void tearDown() throws Exception {
     coreNameRef.set(null);
-    coreNodeNameRef.set(null);
+    replicaNameRef.set(null);
     sleepTime.set(-1);
     
     if (null != cluster) {
@@ -112,8 +112,8 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
     solrClient.commit();
 
     AtomicInteger expectedDocs = new AtomicInteger(1);
-    AtomicReference<String> failingCoreNodeName = new AtomicReference<>();
-    CollectionStateWatcher stateWatcher = createActiveReplicaSearcherWatcher(expectedDocs, failingCoreNodeName);
+    AtomicReference<String> failingReplicaName = new AtomicReference<>();
+    CollectionStateWatcher stateWatcher = createActiveReplicaSearcherWatcher(expectedDocs, failingReplicaName);
 
     JettySolrRunner runner = cluster.getJettySolrRunner(0);
     runner.stop();
@@ -130,7 +130,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
     cluster.waitForAllNodes(30);
     cluster.getSolrClient().getZkStateReader().registerCollectionStateWatcher(collectionName, stateWatcher);
     cluster.waitForActiveCollection(collectionName, 1, 1);
-    assertNull("No replica should have been active without registering a searcher, found: " + failingCoreNodeName.get(), failingCoreNodeName.get());
+    assertNull("No replica should have been active without registering a searcher, found: " + failingReplicaName.get(), failingReplicaName.get());
     cluster.getSolrClient().getZkStateReader().removeCollectionStateWatcher(collectionName, stateWatcher);
   }
 
@@ -160,18 +160,18 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
     solrClient.commit();
 
     AtomicInteger expectedDocs = new AtomicInteger(1);
-    AtomicReference<String> failingCoreNodeName = new AtomicReference<>();
+    AtomicReference<String> failingReplicaName = new AtomicReference<>();
 
     QueryResponse response = solrClient.query(new SolrQuery("*:*"));
     assertEquals(1, response.getResults().getNumFound());
 
     // reset
     coreNameRef.set(null);
-    coreNodeNameRef.set(null);
-    failingCoreNodeName.set(null);
+    replicaNameRef.set(null);
+    failingReplicaName.set(null);
     sleepTime.set(5000);
 
-    CollectionStateWatcher stateWatcher = createActiveReplicaSearcherWatcher(expectedDocs, failingCoreNodeName);
+    CollectionStateWatcher stateWatcher = createActiveReplicaSearcherWatcher(expectedDocs, failingReplicaName);
     cluster.getSolrClient().getZkStateReader().registerCollectionStateWatcher(collectionName, stateWatcher);
 
     JettySolrRunner newNode = cluster.startJettySolrRunner();
@@ -181,7 +181,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
         .process(solrClient);
 
     waitForState("The collection should have 1 shard and 2 replica", collectionName, clusterShape(1, 2));
-    assertNull("No replica should have been active without registering a searcher, found: " + failingCoreNodeName.get(), failingCoreNodeName.get());
+    assertNull("No replica should have been active without registering a searcher, found: " + failingReplicaName.get(), failingReplicaName.get());
 
     // stop the old node
     log.info("Stopping old node 1");
@@ -206,8 +206,8 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
 
     // reset
     coreNameRef.set(null);
-    coreNodeNameRef.set(null);
-    failingCoreNodeName.set(null);
+    replicaNameRef.set(null);
+    failingReplicaName.set(null);
     sleepTime.set(5000);
 
     // inject wrong signature output
@@ -218,7 +218,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
     waitForState("", collectionName, clusterShape(1, 2));
     // invoke statewatcher explicitly to avoid race condition where the assert happens before the state watcher is invoked by ZkStateReader
     cluster.getSolrClient().getZkStateReader().registerCollectionStateWatcher(collectionName, stateWatcher);
-    assertNull("No replica should have been active without registering a searcher, found: " + failingCoreNodeName.get(), failingCoreNodeName.get());
+    assertNull("No replica should have been active without registering a searcher, found: " + failingReplicaName.get(), failingReplicaName.get());
 
     oldNodeName.set(cluster.getJettySolrRunner(1).getNodeName());
     assertSame(oldNode, cluster.stopJettySolrRunner(1)); // old node is now at 1
@@ -228,8 +228,8 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
 
     // reset
     coreNameRef.set(null);
-    coreNodeNameRef.set(null);
-    failingCoreNodeName.set(null);
+    replicaNameRef.set(null);
+    failingReplicaName.set(null);
     sleepTime.set(14000);  // has to be higher than the twice the recovery wait pause between attempts plus some margin
 
     // inject failure
@@ -240,23 +240,23 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
     waitForState("", collectionName, clusterShape(1, 2));
     // invoke statewatcher explicitly to avoid race condition where the assert happens before the state watcher is invoked by ZkStateReader
     cluster.getSolrClient().getZkStateReader().registerCollectionStateWatcher(collectionName, stateWatcher);
-    assertNull("No replica should have been active without registering a searcher, found: " + failingCoreNodeName.get(), failingCoreNodeName.get());
+    assertNull("No replica should have been active without registering a searcher, found: " + failingReplicaName.get(), failingReplicaName.get());
     cluster.getSolrClient().getZkStateReader().removeCollectionStateWatcher(collectionName, stateWatcher);
   }
 
-  private CollectionStateWatcher createActiveReplicaSearcherWatcher(AtomicInteger expectedDocs, AtomicReference<String> failingCoreNodeName) {
+  private CollectionStateWatcher createActiveReplicaSearcherWatcher(AtomicInteger expectedDocs, AtomicReference<String> failingReplicaName) {
     return new CollectionStateWatcher() {
       @Override
       public boolean onStateChanged(Set<String> liveNodes, DocCollection collectionState) {
         try {
-          String coreNodeName = coreNodeNameRef.get();
+          String replicaName = replicaNameRef.get();
           String coreName = coreNameRef.get();
-          if (coreNodeName == null || coreName == null) return false;
-          Replica replica = collectionState.getReplica(coreNodeName);
+          if (replicaName == null || coreName == null) return false;
+          Replica replica = collectionState.getReplica(replicaName);
           if (replica == null) return false;
           log.info("Collection state: {}", collectionState);
           if (replica.isActive(liveNodes)) {
-            log.info("Active replica: {}", coreNodeName);
+            log.info("Active replica: {}", replicaName);
             for (int i = 0; i < cluster.getJettySolrRunners().size(); i++) {
               JettySolrRunner jettySolrRunner = cluster.getJettySolrRunner(i);
               if (log.isInfoEnabled()) {
@@ -277,7 +277,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
                   if (registeredSearcher != null) {
                     log.error("registered searcher not null, maxdocs = {}", registeredSearcher.get().maxDoc());
                     if (registeredSearcher.get().maxDoc() != expectedDocs.get()) {
-                      failingCoreNodeName.set(coreNodeName);
+                      failingReplicaName.set(replicaName);
                       registeredSearcher.decref();
                       return false;
                     } else {
@@ -295,7 +295,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
                       log.error("newest searcher was also null!");
                     }
                     // no registered searcher but replica is active!
-                    failingCoreNodeName.set(coreNodeName);
+                    failingReplicaName.set(replicaName);
                   }
                 }
               }
@@ -328,7 +328,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
     @Override
     public void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher) {
       if (sleepTime.get() > 0) {
-        TestCloudSearcherWarming.coreNodeNameRef.set(newSearcher.getCore().getCoreDescriptor().getCloudDescriptor().getCoreNodeName());
+        TestCloudSearcherWarming.replicaNameRef.set(newSearcher.getCore().getCoreDescriptor().getCloudDescriptor().getCoreNodeName());
         TestCloudSearcherWarming.coreNameRef.set(newSearcher.getCore().getName());
         if (log.isInfoEnabled()) {
           log.info("Sleeping for {} on newSearcher: {}, currentSearcher: {} belonging to (newest) core: {}, id: {}"
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
index 8ffff31c..5230c8b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
@@ -957,7 +957,7 @@ public class TestTlogReplica extends SolrCloudTestCase {
       for (SolrCore solrCore : solrRunner.getCoreContainer().getCores()) {
         CloudDescriptor cloudDescriptor = solrCore.getCoreDescriptor().getCloudDescriptor();
         Slice slice = docCollection.getSlice(cloudDescriptor.getShardId());
-        Replica replica = docCollection.getReplica(cloudDescriptor.getCoreNodeName());
+        Replica replica = docCollection.getReplica(cloudDescriptor.getReplicaName());
         if (slice.getLeader().equals(replica) && isLeader) {
           rs.add(solrCore);
         } else if (!slice.getLeader().equals(replica) && !isLeader) {
@@ -992,7 +992,7 @@ public class TestTlogReplica extends SolrCloudTestCase {
       for (SolrCore solrCore : solrRunner.getCoreContainer().getCores()) {
         CloudDescriptor cloudDescriptor = solrCore.getCoreDescriptor().getCloudDescriptor();
         Slice slice = docCollection.getSlice(cloudDescriptor.getShardId());
-        Replica replica = docCollection.getReplica(cloudDescriptor.getCoreNodeName());
+        Replica replica = docCollection.getReplica(cloudDescriptor.getReplicaName());
         if (slice.getLeader() == replica && isLeader) {
           rs.add(solrRunner);
         } else if (slice.getLeader() != replica && !isLeader) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java b/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
index 8018e78..18be715 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
@@ -247,7 +247,7 @@ public class ZkControllerTest extends SolrTestCaseJ4 {
 
     /*
     This test asserts that if zkController.publishAndWaitForDownStates uses only core name to check if all local
-    cores are down then the method will return immediately but if it uses coreNodeName (as it does after SOLR-6665 then
+    cores are down then the method will return immediately but if it uses replicaName (as it does after SOLR-6665 then
     the method will timeout).
     We setup the cluster state in such a way that two replicas with same core name exist on non-existent nodes
     and core container also has a dummy core that has the same core name. The publishAndWaitForDownStates before SOLR-6665
@@ -270,9 +270,9 @@ public class ZkControllerTest extends SolrTestCaseJ4 {
         @Override
         public List<CoreDescriptor> getCoreDescriptors() {
           CoreDescriptor descriptor = new CoreDescriptor(collectionName, TEST_PATH(), Collections.emptyMap(), new Properties(), zkControllerRef.get());
-          // non-existent coreNodeName, this will cause zkController.publishAndWaitForDownStates to wait indefinitely
-          // when using coreNodeName but usage of core name alone will return immediately
-          descriptor.getCloudDescriptor().setCoreNodeName("core_node0");
+          // non-existent replicaName, this will cause zkController.publishAndWaitForDownStates to wait indefinitely
+          // when using replicaName but usage of core name alone will return immediately
+          descriptor.getCloudDescriptor().setReplicaName("core_node0");
           return Collections.singletonList(descriptor);
         }
       };
diff --git a/solr/core/src/test/org/apache/solr/core/CoreSorterTest.java b/solr/core/src/test/org/apache/solr/core/CoreSorterTest.java
index fd7b5c4..9bc5af4 100644
--- a/solr/core/src/test/org/apache/solr/core/CoreSorterTest.java
+++ b/solr/core/src/test/org/apache/solr/core/CoreSorterTest.java
@@ -34,6 +34,7 @@ import org.apache.solr.common.cloud.DocCollection;
 import org.apache.solr.common.cloud.DocRouter;
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.common.cloud.Slice;
+import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.core.CoreSorter.CountsForEachShard;
 import org.junit.Test;
 
@@ -187,7 +188,7 @@ public class CoreSorterTest extends SolrTestCaseJ4 {
     Map<String,String> props = map(
         CoreDescriptor.CORE_SHARD, r.getShard(),
         CoreDescriptor.CORE_COLLECTION, r.getCollection(),
-        CoreDescriptor.CORE_NODE_NAME, r.getNodeName()
+        CommonParams.REPLICA_NAME, r.getNodeName()
     );
     return new CoreDescriptor(r.getCoreName(), TEST_PATH(), props , null, mock(ZkController.class));
   }
diff --git a/solr/core/src/test/org/apache/solr/core/TestBadConfig.java b/solr/core/src/test/org/apache/solr/core/TestBadConfig.java
index 1dfad85..91fd9ae 100644
--- a/solr/core/src/test/org/apache/solr/core/TestBadConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestBadConfig.java
@@ -16,10 +16,6 @@
  */
 package org.apache.solr.core;
 
-import javax.script.ScriptEngineManager;
-
-import org.junit.Assume;
-
 public class TestBadConfig extends AbstractBadConfigTestBase {
 
   public void testUnsetSysProperty() throws Exception {
@@ -44,7 +40,7 @@ public class TestBadConfig extends AbstractBadConfigTestBase {
   }
 
   public void testUpdateLogButNoVersionField() throws Exception {
-    
+
     System.setProperty("enable.update.log", "true");
     try {
       assertConfigs("solrconfig.xml", "schema12.xml", "_version_");
@@ -53,28 +49,6 @@ public class TestBadConfig extends AbstractBadConfigTestBase {
     }
   }
 
-  public void testBogusScriptEngine() throws Exception {
-    // sanity check
-    Assume.assumeTrue(null == (new ScriptEngineManager()).getEngineByName("giberish"));
-                      
-    assertConfigs("bad-solrconfig-bogus-scriptengine-name.xml",
-                  "schema.xml","giberish");
-  }
-
-  public void testMissingScriptFile() throws Exception {
-    // sanity check
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByExtension("js"));
-    assertConfigs("bad-solrconfig-missing-scriptfile.xml",
-                  "schema.xml","a-file-name-that-does-not-exist.js");
-  }
-
-  public void testInvalidScriptFile() throws Exception {
-    // sanity check
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByName("javascript"));
-    assertConfigs("bad-solrconfig-invalid-scriptfile.xml",
-                  "schema.xml","currency.xml");
-  }
-
   public void testBogusMergePolicy() throws Exception {
     assertConfigs("bad-mpf-solrconfig.xml", "schema-minimal.xml",
                   "DummyMergePolicyFactory");
@@ -89,7 +63,7 @@ public class TestBadConfig extends AbstractBadConfigTestBase {
     assertConfigs("bad-solrconfig-managed-schema-named-schema.xml.xml",
                   "schema-minimal.xml", "managedSchemaResourceName can't be 'schema.xml'");
   }
-  
+
   public void testUnknownSchemaAttribute() throws Exception {
     assertConfigs("bad-solrconfig-unexpected-schema-attribute.xml", "schema-minimal.xml",
                   "Unexpected arg(s): {bogusParam=bogusValue}");
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java
index 25b6693..2bcb214 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java
@@ -229,7 +229,7 @@ public class HealthCheckHandlerTest extends SolrCloudTestCase {
     Properties props = new Properties();
     props.put(CoreDescriptor.CORE_SHARD, shardId);
     props.put(CoreDescriptor.CORE_COLLECTION, collection);
-    props.put(CoreDescriptor.CORE_NODE_NAME, name);
+    props.put(CommonParams.REPLICA_NAME, name);
     CloudDescriptor cd = new CloudDescriptor(null, name, props);
     cd.setHasRegistered(registered);
     cd.setLastPublished(state);
diff --git a/solr/core/src/test/org/apache/solr/metrics/reporters/solr/SolrShardReporterTest.java b/solr/core/src/test/org/apache/solr/metrics/reporters/solr/SolrShardReporterTest.java
index 3d8669a..60d7650 100644
--- a/solr/core/src/test/org/apache/solr/metrics/reporters/solr/SolrShardReporterTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/reporters/solr/SolrShardReporterTest.java
@@ -85,7 +85,7 @@ public class SolrShardReporterTest extends AbstractFullDistribZkTestBase {
         DocCollection docCollection = state.getCollection(cloudDesc.getCollectionName());
         String replicaName = Utils.parseMetricsReplicaName(cloudDesc.getCollectionName(), coreName);
         if (replicaName == null) {
-          replicaName = cloudDesc.getCoreNodeName();
+          replicaName = cloudDesc.getReplicaName();
         }
         String registryName = SolrCoreMetricManager.createRegistryName(true,
             cloudDesc.getCollectionName(), cloudDesc.getShardId(), replicaName, null);
diff --git a/solr/core/src/test/org/apache/solr/update/processor/ScriptEngineTest.java b/solr/core/src/test/org/apache/solr/update/processor/ScriptEngineTest.java
deleted file mode 100644
index 8a913e1..0000000
--- a/solr/core/src/test/org/apache/solr/update/processor/ScriptEngineTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.update.processor;
-
-import org.apache.lucene.util.Constants;
-
-import javax.script.Invocable;
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-import javax.script.ScriptException;
-import java.io.StringReader;
-
-import org.apache.solr.SolrTestCase;
-import org.junit.Assume;
-import org.junit.BeforeClass;
-
-/**
- * Sanity tests basic functionality of {@link ScriptEngineManager} and 
- * {@link ScriptEngine} w/o exercising any Lucene specific code.
- */
-public class ScriptEngineTest extends SolrTestCase {
-
-  private ScriptEngineManager manager;
-
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    assumeFalse("https://twitter.com/UweSays/status/260487231880433664 / SOLR-4233: OS X bogusly starts AWT!",
-        Constants.MAC_OS_X);
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByExtension("js"));
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByName("JavaScript"));
-  }
-
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
-    manager = new ScriptEngineManager();
-  }
-
-  public void testGetEngineByName() {
-    ScriptEngine engine = manager.getEngineByName("JavaScript");
-    assertNotNull(engine);
-    engine = manager.getEngineByName("DummyScript");
-    assertNull(engine);
-  }
-
-  public void testGetEngineByExtension() {
-    ScriptEngine engine = manager.getEngineByExtension("js");
-    assertNotNull(engine);
-    engine = manager.getEngineByExtension("foobar");
-    assertNull(engine);
-  }
-
-  public void testEvalText() throws ScriptException, NoSuchMethodException {
-    ScriptEngine engine = manager.getEngineByName("JavaScript");
-    assertNotNull(engine);
-    engine.eval("function add(a,b) { return a + b }");
-    Number result = (Number) ((Invocable)engine).invokeFunction("add", 1, 2);
-    assertNotNull(result);
-    assertEquals(3, result.intValue());
-  }
-
-  public void testEvalReader() throws ScriptException, NoSuchMethodException {
-    ScriptEngine engine = manager.getEngineByName("JavaScript");
-    assertNotNull(engine);
-    StringReader reader = new StringReader("function add(a,b) { return a + b }");
-    engine.eval(reader);
-    Number result = (Number) ((Invocable)engine).invokeFunction("add", 1, 2);
-    assertNotNull(result);
-    assertEquals(3, result.intValue());
-  }
-
-  public void testPut() throws ScriptException, NoSuchMethodException {
-    manager.put("a", 1);
-    ScriptEngine engine = manager.getEngineByName("JavaScript");
-    engine.put("b", 2);
-    assertNotNull(engine);
-    engine.eval("function add() { return a + b }");
-    Number result = (Number) ((Invocable)engine).invokeFunction("add", 1, 2);
-    assertNotNull(result);
-    assertEquals(3, result.intValue());
-  }
-
- public void testJRuby() throws ScriptException, NoSuchMethodException {  
-   // Simply adding jruby.jar to Solr's lib/ directory gets this test passing
-   ScriptEngine engine = manager.getEngineByName("jruby");
-
-   Assume.assumeNotNull(engine);
-
-   assertNotNull(engine);
-   engine.eval("def add(a,b); a + b; end");
-   Number result = (Number) ((Invocable)engine).invokeFunction("add", 1, 2);
-   assertNotNull(result);
-   assertEquals(3, result.intValue());
- }
-
-}
diff --git a/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java
deleted file mode 100644
index 09dd783..0000000
--- a/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.update.processor;
-
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrInputDocument;
-import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.core.SolrCore;
-import org.junit.Assume;
-import org.junit.BeforeClass;
-
-/**
- * Tests {@link StatelessScriptUpdateProcessorFactory}.
- *
- * TODO: This test, to run from an IDE, requires a working directory of &lt;path-to&gt;/solr/core/src/test-files.  Fix!
- */
-public class StatelessScriptUpdateProcessorFactoryTest extends UpdateProcessorTestBase {
-
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByExtension("js"));
-    initCore("solrconfig-script-updateprocessor.xml", "schema12.xml");
-  }
-
-  /**
-   * simple test of a basic script processor chain using the full 
-   * RequestHandler + UpdateProcessorChain flow
-   */
-  public void testFullRequestHandlerFlow() throws Exception {
-
-    assertU("Simple assertion that adding a document works",
-            adoc("id",  "4055",
-                 "subject", "Hoss"));
-    assertU(commit());
-
-    assertQ("couldn't find hoss using script added field",
-            req("q","script_added_i:[40 TO 45]",
-                "fq","id:4055")
-            ,"//result[@numFound=1]"
-            ,"//str[@name='id'][.='4055']"
-            );
-
-    // clean up
-    processDeleteById("run-no-scripts","4055");
-    processCommit("run-no-scripts");
-    
-  }
-
-  public void testSingleScript() throws Exception {
-    SolrCore core = h.getCore();
-    UpdateRequestProcessorChain chained = core.getUpdateProcessingChain("single-script");
-    final StatelessScriptUpdateProcessorFactory factory = ((StatelessScriptUpdateProcessorFactory) chained.getProcessors().get(0));
-    final List<String> functionMessages = new ArrayList<>();
-    factory.setScriptEngineCustomizer(new ScriptEngineCustomizer() {
-      @Override
-      public void customize(ScriptEngine engine) {
-        engine.put("functionMessages", functionMessages);
-      }
-    });
-    assertNotNull(chained);
-
-    SolrInputDocument d = processAdd("single-script",
-        doc(f("id", "1"),
-            f("name", " foo "),
-            f("subject", "bar")));
-
-    processCommit("run-no-scripts");
-
-    assertQ("couldn't find doc by id",
-            req("q","id:1")
-            , "//result[@numFound=1]");
-
-    processDeleteById("single-script","1");
-    processCommit("single-script");
-    
-    assertQ("found deleted doc",
-            req("q","id:1")
-            , "//result[@numFound=0]");
-
-
-    assertEquals(3, functionMessages.size());
-
-    assertTrue(functionMessages.contains("processAdd0"));
-    assertTrue(functionMessages.contains("processDelete0"));
-    assertTrue(functionMessages.contains("processCommit0"));
-
-  }
-
-  public void testMultipleScripts() throws Exception {
-    SolrCore core = h.getCore();
-
-    for (final String chain : new String[] {"dual-scripts-arr", 
-                                            "dual-scripts-strs"}) {
-    
-      UpdateRequestProcessorChain chained = core.getUpdateProcessingChain(chain);
-      final StatelessScriptUpdateProcessorFactory factory = 
-        ((StatelessScriptUpdateProcessorFactory) chained.getProcessors().get(0));
-      final List<String> functionMessages = new ArrayList<>();
-      ScriptEngineCustomizer customizer = new ScriptEngineCustomizer() {
-          @Override
-          public void customize(ScriptEngine engine) {
-            engine.put("functionMessages", functionMessages);
-          }
-        };
-      factory.setScriptEngineCustomizer(customizer);
-      assertNotNull(chained);
-
-      SolrInputDocument d = processAdd(chain,
-                                       doc(f("id", "2"),
-                                           f("name", " foo "),
-                                           f("subject", "bar")));
-      
-      assertEquals(chain + " didn't add Double field", 
-                   42.3d, d.getFieldValue("script_added_d"));
-      assertEquals(chain + " didn't add integer field",
-          42, d.getFieldValue("script_added_i"));
-      
-      processCommit("run-no-scripts");
-
-      assertQ(chain + ": couldn't find doc by id",
-              req("q","id:2")
-              , "//result[@numFound=1]");
-
-      processDeleteById(chain, "2");
-      processCommit(chain);
-      
-      assertEquals(chain, 6, functionMessages.size());
-      assertTrue(chain, functionMessages.contains("processAdd0"));
-      assertTrue(chain, functionMessages.contains("processAdd1"));
-      assertTrue(chain + ": script order doesn't match conf order",
-                 functionMessages.indexOf("processAdd0") 
-                 < functionMessages.indexOf("processAdd1"));
-
-      assertTrue(chain, functionMessages.contains("processDelete0"));
-      assertTrue(chain, functionMessages.contains("processDelete1"));
-      assertTrue(chain + ": script order doesn't match conf order",
-                 functionMessages.indexOf("processDelete0") 
-                 < functionMessages.indexOf("processDelete1"));
-
-      assertTrue(chain, functionMessages.contains("processCommit0"));
-      assertTrue(chain, functionMessages.contains("processCommit1"));
-      assertTrue(chain + ": script order doesn't match conf order",
-                 functionMessages.indexOf("processCommit0") 
-                 < functionMessages.indexOf("processCommit1"));
-
-      finish(chain);
-    
-      assertEquals(chain, 8, functionMessages.size());
-
-      assertTrue(chain, functionMessages.contains("finish0"));
-      assertTrue(chain, functionMessages.contains("finish1"));
-      assertTrue(chain + ": script order doesn't match conf order",
-                 functionMessages.indexOf("finish0") 
-                 < functionMessages.indexOf("finish1"));
-
-      assertQ(chain + ": found deleted doc",
-              req("q","id:2")
-              , "//result[@numFound=0]");
-      
-    }
-  }
-
-
-  public void testConditionalExecution() throws Exception {
-    for (String chain : new String[] {"conditional-script", 
-                                      "conditional-scripts"}) {
-
-      ModifiableSolrParams reqParams = new ModifiableSolrParams();
-      
-      SolrInputDocument d = processAdd(chain,
-                                       reqParams,
-                                       doc(f("id", "3"),
-                                           f("name", " foo "),
-                                           f("subject", "bar")));
-      
-      assertFalse(chain + " added String field despite condition", 
-                  d.containsKey("script_added_s"));
-      assertFalse(chain + " added Double field despite condition", 
-                  d.containsKey("script_added_d"));
-      
-      reqParams.add("go-for-it", "true");
-      
-      d = processAdd(chain,
-                     reqParams,
-                     doc(f("id", "4"),
-                         f("name", " foo "),
-                         f("subject", "bar")));
-      
-      assertEquals(chain + " didn't add String field", 
-                   "i went for it", d.getFieldValue("script_added_s"));
-      assertEquals(chain +" didn't add Double field", 
-                   42.3d, d.getFieldValue("script_added_d"));
-      assertEquals(chain + " didn't add integer field",
-          42, d.getFieldValue("script_added_i"));
-    }
-  }
-
-  public void testForceEngine() throws Exception {
-    Assume.assumeNotNull((new ScriptEngineManager()).getEngineByName("javascript"));
-
-    final String chain = "force-script-engine";
-    SolrInputDocument d = processAdd(chain,
-                                     doc(f("id", "5"),
-                                         f("name", " foo "),
-                                         f("subject", "bar")));
-      
-    assertEquals(chain +" didn't add Double field", 
-                 42.3d, d.getFieldValue("script_added_d"));
-    assertEquals(chain + " didn't add integer field",
-        42, d.getFieldValue("script_added_i"));
-  }
-
-  public void testPropogatedException() throws Exception  {
-    final String chain = "error-on-add";
-    SolrException e = expectThrows(SolrException.class, () ->
-        processAdd(chain, doc(f("id", "5"), f("name", " foo "),
-            f("subject", "bar")))
-    );
-    assertTrue("Exception doesn't contain script error string: " + e.getMessage(),
-        0 < e.getMessage().indexOf("no-soup-fo-you"));
-  }
-
-  public void testMissingFunctions() throws Exception  {
-    final String chain = "missing-functions";
-    SolrException e = expectThrows(SolrException.class, () ->
-        processAdd(chain, doc(f("id", "5"),
-            f("name", " foo "), f("subject", "bar")))
-    );
-    assertTrue("Exception doesn't contain expected error: " + e.getMessage(),
-        0 < e.getMessage().indexOf("processAdd"));
-  }
-
-  public void testJavaScriptCompatibility() throws Exception  {
-    final String chain = "javascript-compatibility";
-    SolrInputDocument d = processAdd(chain,
-                                 doc(f("id", "5"),
-                                     f("name", " foo "),
-                                     f("subject", "BAR")));
-    assertEquals("bar", d.getFieldValue("term_s"));
-
-  }
-
-  public void testScriptSandbox() throws Exception  {
-    assumeTrue("This test only works with security manager", System.getSecurityManager() != null);
-    expectThrows(SecurityException.class, () -> {
-      processAdd("evil",
-        doc(f("id", "5"),
-            f("name", " foo "),
-            f("subject", "BAR")));
-    });
-  }
-
-}
diff --git a/solr/packaging/build.gradle b/solr/packaging/build.gradle
index 27e8e3a..3b242ad 100644
--- a/solr/packaging/build.gradle
+++ b/solr/packaging/build.gradle
@@ -52,6 +52,7 @@ dependencies {
    ":solr:contrib:langid",
    ":solr:contrib:ltr",
    ":solr:contrib:prometheus-exporter",
+   ":solr:contrib:scripting"
   ].each { contribName ->
     distSolr project(contribName)
     contrib  project(path: contribName, configuration: "packaging")
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
index 8fea9ca..14f094d 100644
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
@@ -83,6 +83,8 @@
 
   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-ltr-\d.*\.jar" />
 
+  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-scripting-\d.*\.jar" />
+
   <!-- an exact 'path' can be used instead of a 'dir' to specify a
        specific jar file.  This will cause a serious error to be logged
        if it can't be loaded.
@@ -379,11 +381,11 @@
   <query>
 
     <!-- Maximum number of clauses allowed when parsing a boolean query string.
-         
+
          This limit only impacts boolean queries specified by a user as part of a query string,
          and provides per-collection controls on how complex user specified boolean queries can
          be.  Query strings that specify more clauses then this will result in an error.
-         
+
          If this per-collection limit is greater then the global `maxBooleanClauses` limit
          specified in `solr.xml`, it will have no effect, as that setting also limits the size
          of user specified boolean queries.
@@ -656,6 +658,9 @@
          enableRemoteStreaming - enables use of the stream.file
          and stream.url parameters for specifying remote streams.
 
+         enableStreamBody - This attribute controls whether streaming
+         content from the HTTP parameter stream.body is allowed.
+
          multipartUploadLimitInKB - specifies the max size (in KiB) of
          Multipart File Uploads that Solr will allow in a Request.
 
@@ -674,12 +679,12 @@
          *** WARNING ***
          Before enabling remote streaming, you should make sure your
          system has authentication enabled.
-
-    <requestParsers enableRemoteStreaming="false"
+       -->
+    <requestParsers enableRemoteStreaming="true"
+                    enableStreamBody="true"
                     multipartUploadLimitInKB="-1"
                     formdataUploadLimitInKB="-1"
                     addHttpRequestToContext="false"/>
-      -->
 
     <!-- HTTP Caching
 
@@ -1273,19 +1278,17 @@
 
     This example hooks in an update processor implemented using JavaScript.
 
-    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
-  -->
-  <!--
-    <updateRequestProcessorChain name="script">
-      <processor class="solr.StatelessScriptUpdateProcessorFactory">
-        <str name="script">update-script.js</str>
-        <lst name="params">
-          <str name="config_param">example config parameter</str>
-        </lst>
-      </processor>
-      <processor class="solr.RunUpdateProcessorFactory" />
-    </updateRequestProcessorChain>
+    See more about script update processor at https://lucene.apache.org/solr/guide/script-update-processor.html
   -->
+  <updateRequestProcessorChain name="script">
+    <processor class="org.apache.solr.scripting.update.ScriptUpdateProcessorFactory">
+      <str name="script">update-script.js</str>
+      <lst name="params">
+        <str name="config_param">example config parameter</str>
+      </lst>
+    </processor>
+    <processor class="solr.RunUpdateProcessorFactory" />
+  </updateRequestProcessorChain>
 
   <!-- Response Writers
 
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/update-script.js b/solr/server/solr/configsets/sample_techproducts_configs/conf/update-script.js
index 49b07f9..bd36118 100644
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/update-script.js
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/update-script.js
@@ -4,14 +4,14 @@
   In order for this to be executed, it must be properly wired into solrconfig.xml; by default it is commented out in
   the example solrconfig.xml and must be uncommented to be enabled.
 
-  See http://wiki.apache.org/solr/ScriptUpdateProcessor for more details.
+  See https://lucene.apache.org/solr/guide/script-update-processor.html for more details.
 */
 
 function processAdd(cmd) {
 
   doc = cmd.solrDoc;  // org.apache.solr.common.SolrInputDocument
   id = doc.getFieldValue("id");
-  logger.info("update-script#processAdd: id=" + id);
+  logger.warn("update-script#processAdd: id=" + id);  // WARN level messages will show up in Solr Admin Logging UI
 
 // Set a field value:
 //  doc.setField("foo_s", "whatever");
diff --git a/solr/solr-ref-guide/src/configsets-api.adoc b/solr/solr-ref-guide/src/configsets-api.adoc
index ead84f1..d5fd3dc 100644
--- a/solr/solr-ref-guide/src/configsets-api.adoc
+++ b/solr/solr-ref-guide/src/configsets-api.adoc
@@ -88,7 +88,7 @@ This functionality is enabled by default, but can be disabled via a runtime para
 A configset is uploaded in a "trusted" mode if authentication is enabled and the upload operation is performed as an authenticated request. Without authentication, a configset is uploaded in an "untrusted" mode. Upon creation of a collection using an "untrusted" configset, the following functionality will not work:
 
 * The XSLT transformer (`tr` parameter) cannot be used at request processing time.
-* If specified in the configset, the StatelessScriptUpdateProcessor will not initialize.
+* If specified in the configset, the ScriptUpdateProcessorFactory will not initialize.
 * Collections won't initialize if <lib> directives are used in the configset. (Note: Libraries added to Solr's classpath don't need the <lib> directive)
 
 If you use any of these parameters or features, you must have enabled security features in your Solr installation and you must upload the configset as an authenticated user.
diff --git a/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc b/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc
index f1f0fa2..4e83f0e 100644
--- a/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc
+++ b/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc
@@ -8,6 +8,7 @@
     query-settings-in-solrconfig, \
     requestdispatcher-in-solrconfig, \
     update-request-processors, \
+    script-update-processor, \    
     codec-factory
 
 // Licensed to the Apache Software Foundation (ASF) under one
diff --git a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
index 60ab785..e554c15 100644
--- a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
+++ b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
@@ -144,6 +144,9 @@ _(raw; not yet edited)_
 
 * SOLR-14972: The default port of prometheus exporter has changed from 9983 to 8989, so you may need to adjust your configuration after upgrade.
 
+* SOLR-14067: StatelessScriptUpdateProcessorFactory moved to it's own /contrib/scripting/ package instead
+ of shipping as part of Solr due to security concerns.  Renamed to ScriptUpdateProcessorFactory for simpler name.
+
 === Upgrade Prerequisites in Solr 9
 
 * Upgrade all collections in stateFormat=1 to stateFormat=2 *before* upgrading to Solr 9, as Solr 9 does not support the
diff --git a/solr/solr-ref-guide/src/update-request-processors.adoc b/solr/solr-ref-guide/src/update-request-processors.adoc
index 7e9dce8..aeee353 100644
--- a/solr/solr-ref-guide/src/update-request-processors.adoc
+++ b/solr/solr-ref-guide/src/update-request-processors.adoc
@@ -283,7 +283,7 @@ What follows are brief descriptions of the currently available update request pr
 
 {solr-javadocs}/core/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.html[SignatureUpdateProcessorFactory]:: Uses a defined set of fields to generate a hash "signature" for the document. Useful for only indexing one copy of "similar" documents.
 
-{solr-javadocs}/core/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.html[StatelessScriptUpdateProcessorFactory]:: An update request processor factory that enables the use of update processors implemented as scripts.
+{solr-javadocs}/contrib/scripting/org/apache/solr/scripting/update/ScriptUpdateProcessorFactory.html[ScriptUpdateProcessorFactory]:: An processor that enables the use of update processors implemented as scripts.  Learn more at the <<script-update-processor.adoc#script-update-processor,script update processor>> page.
 
 {solr-javadocs}/core/org/apache/solr/update/processor/TemplateUpdateProcessorFactory.html[TemplateUpdateProcessorFactory]:: Allows adding new fields to documents based on a template pattern. This update processor can also be used at runtime (without defining it in `solrconfig.xml`), see the section <<templateupdateprocessorfactory>> below.
 
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/ShardTerms.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/ShardTerms.java
index cd6ead0..adb0822 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/ShardTerms.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/ShardTerms.java
@@ -58,31 +58,31 @@ public class ShardTerms implements MapWriter {
   }
 
   /**
-   * Can {@code coreNodeName} become leader?
-   * @param coreNodeName of the replica
-   * @return true if {@code coreNodeName} can become leader, false if otherwise
+   * Can {@code replicaName} become leader?
+   * @param replicaName of the replica
+   * @return true if {@code replicaName} can become leader, false if otherwise
    */
-  public boolean canBecomeLeader(String coreNodeName) {
-    return haveHighestTermValue(coreNodeName) && !values.containsKey(recoveringTerm(coreNodeName));
+  public boolean canBecomeLeader(String replicaName) {
+    return haveHighestTermValue(replicaName) && !values.containsKey(recoveringTerm(replicaName));
   }
 
   /**
-   * Is {@code coreNodeName}'s term highest?
-   * @param coreNodeName of the replica
-   * @return true if term of {@code coreNodeName} is highest
+   * Is {@code replicaName}'s term highest?
+   * @param replicaName of the replica
+   * @return true if term of {@code replicaName} is highest
    */
-  public boolean haveHighestTermValue(String coreNodeName) {
+  public boolean haveHighestTermValue(String replicaName) {
     if (values.isEmpty()) return true;
-    return values.getOrDefault(coreNodeName, 0L) == maxTerm;
+    return values.getOrDefault(replicaName, 0L) == maxTerm;
   }
 
-  public Long getTerm(String coreNodeName) {
-    return values.get(coreNodeName);
+  public Long getTerm(String replicaName) {
+    return values.get(replicaName);
   }
 
   /**
    * Return a new {@link ShardTerms} in which term of {@code leader} is higher than {@code replicasNeedingRecovery}
-   * @param leader coreNodeName of leader
+   * @param leader replicaName of leader
    * @param replicasNeedingRecovery set of replicas in which their terms should be lower than leader's term
    * @return null if term of {@code leader} is already higher than {@code replicasNeedingRecovery}
    */
@@ -137,61 +137,61 @@ public class ShardTerms implements MapWriter {
   }
 
   /**
-   * Return a new {@link ShardTerms} in which terms for the {@code coreNodeName} are removed
-   * @param coreNodeName of the replica
-   * @return null if term of {@code coreNodeName} is already not exist
+   * Return a new {@link ShardTerms} in which terms for the {@code replicaName} are removed
+   * @param replicaName of the replica
+   * @return null if term of {@code replicaName} is already not exist
    */
-  public ShardTerms removeTerm(String coreNodeName) {
-    if (!values.containsKey(recoveringTerm(coreNodeName)) && !values.containsKey(coreNodeName)) {
+  public ShardTerms removeTerm(String replicaName) {
+    if (!values.containsKey(recoveringTerm(replicaName)) && !values.containsKey(replicaName)) {
       return null;
     }
 
     HashMap<String, Long> newValues = new HashMap<>(values);
-    newValues.remove(coreNodeName);
-    newValues.remove(recoveringTerm(coreNodeName));
+    newValues.remove(replicaName);
+    newValues.remove(recoveringTerm(replicaName));
 
     return new ShardTerms(newValues, version);
   }
 
   /**
-   * Return a new {@link ShardTerms} in which the associate term of {@code coreNodeName} is not null
-   * @param coreNodeName of the replica
-   * @return null if term of {@code coreNodeName} is already exist
+   * Return a new {@link ShardTerms} in which the associate term of {@code replicaName} is not null
+   * @param replicaName of the replica
+   * @return null if term of {@code replicaName} is already exist
    */
-  public ShardTerms registerTerm(String coreNodeName) {
-    if (values.containsKey(coreNodeName)) return null;
+  public ShardTerms registerTerm(String replicaName) {
+    if (values.containsKey(replicaName)) return null;
 
     HashMap<String, Long> newValues = new HashMap<>(values);
-    newValues.put(coreNodeName, 0L);
+    newValues.put(replicaName, 0L);
     return new ShardTerms(newValues, version);
   }
 
   /**
-   * Return a new {@link ShardTerms} in which the associate term of {@code coreNodeName} is equal to zero,
+   * Return a new {@link ShardTerms} in which the associate term of {@code replicaName} is equal to zero,
    * creating it if it does not previously exist.
-   * @param coreNodeName of the replica
-   * @return null if the term of {@code coreNodeName} already exists and is zero
+   * @param replicaName of the replica
+   * @return null if the term of {@code replicaName} already exists and is zero
    */
-  public ShardTerms setTermToZero(String coreNodeName) {
-    if (values.getOrDefault(coreNodeName, -1L) == 0) {
+  public ShardTerms setTermToZero(String replicaName) {
+    if (values.getOrDefault(replicaName, -1L) == 0) {
       return null;
     }
     HashMap<String, Long> newValues = new HashMap<>(values);
-    newValues.put(coreNodeName, 0L);
+    newValues.put(replicaName, 0L);
     return new ShardTerms(newValues, version);
   }
 
   /**
-   * Return a new {@link ShardTerms} in which the term of {@code coreNodeName} is max
-   * @param coreNodeName of the replica
-   * @return null if term of {@code coreNodeName} is already maximum
+   * Return a new {@link ShardTerms} in which the term of {@code replicaName} is max
+   * @param replicaName of the replica
+   * @return null if term of {@code replicaName} is already maximum
    */
-  public ShardTerms setTermEqualsToLeader(String coreNodeName) {
-    if (values.get(coreNodeName) == maxTerm) return null;
+  public ShardTerms setTermEqualsToLeader(String replicaName) {
+    if (values.get(replicaName) == maxTerm) return null;
 
     HashMap<String, Long> newValues = new HashMap<>(values);
-    newValues.put(coreNodeName, maxTerm);
-    newValues.remove(recoveringTerm(coreNodeName));
+    newValues.put(replicaName, maxTerm);
+    newValues.remove(recoveringTerm(replicaName));
     return new ShardTerms(newValues, version);
   }
 
@@ -200,41 +200,41 @@ public class ShardTerms implements MapWriter {
   }
 
   /**
-   * Mark {@code coreNodeName} as recovering
-   * @param coreNodeName of the replica
-   * @return null if {@code coreNodeName} is already marked as doing recovering
+   * Mark {@code replicaName} as recovering
+   * @param replicaName of the replica
+   * @return null if {@code replicaName} is already marked as doing recovering
    */
-  public ShardTerms startRecovering(String coreNodeName) {
-    if (values.get(coreNodeName) == maxTerm)
+  public ShardTerms startRecovering(String replicaName) {
+    if (values.get(replicaName) == maxTerm)
       return null;
 
     HashMap<String, Long> newValues = new HashMap<>(values);
-    if (!newValues.containsKey(recoveringTerm(coreNodeName))) {
-      long currentTerm = newValues.getOrDefault(coreNodeName, 0L);
+    if (!newValues.containsKey(recoveringTerm(replicaName))) {
+      long currentTerm = newValues.getOrDefault(replicaName, 0L);
       // by keeping old term, we will have more information in leader election
-      newValues.put(recoveringTerm(coreNodeName), currentTerm);
+      newValues.put(recoveringTerm(replicaName), currentTerm);
     }
-    newValues.put(coreNodeName, maxTerm);
+    newValues.put(replicaName, maxTerm);
     return new ShardTerms(newValues, version);
   }
 
   /**
-   * Mark {@code coreNodeName} as finished recovering
-   * @param coreNodeName of the replica
-   * @return null if term of {@code coreNodeName} is already finished doing recovering
+   * Mark {@code replicaName} as finished recovering
+   * @param replicaName of the replica
+   * @return null if term of {@code replicaName} is already finished doing recovering
    */
-  public ShardTerms doneRecovering(String coreNodeName) {
-    if (!values.containsKey(recoveringTerm(coreNodeName))) {
+  public ShardTerms doneRecovering(String replicaName) {
+    if (!values.containsKey(recoveringTerm(replicaName))) {
       return null;
     }
 
     HashMap<String, Long> newValues = new HashMap<>(values);
-    newValues.remove(recoveringTerm(coreNodeName));
+    newValues.remove(recoveringTerm(replicaName));
     return new ShardTerms(newValues, version);
   }
 
-  public static String recoveringTerm(String coreNodeName) {
-    return coreNodeName + RECOVERING_TERM_SUFFIX;
+  public static String recoveringTerm(String replicaName) {
+    return replicaName + RECOVERING_TERM_SUFFIX;
   }
 
   @Override
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
index 9e571b7..2a94be2 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
@@ -27,6 +27,7 @@ import org.apache.solr.client.solrj.response.CoreAdminResponse;
 import org.apache.solr.client.solrj.util.SolrIdentifierValidator;
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.common.cloud.ZkStateReader;
+import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.CoreAdminParams;
 import org.apache.solr.common.params.CoreAdminParams.CoreAdminAction;
 import org.apache.solr.common.params.ModifiableSolrParams;
@@ -62,7 +63,7 @@ public class CoreAdminRequest extends SolrRequest<CoreAdminResponse> {
     private Integer numShards;
     private String shardId;
     private String roles;
-    private String coreNodeName;
+    private String replicaName;
     private Boolean loadOnStartup;
     private Boolean isTransient;
     private String collectionConfigName;
@@ -83,7 +84,9 @@ public class CoreAdminRequest extends SolrRequest<CoreAdminResponse> {
     public void setNumShards(int numShards) {this.numShards = numShards;}
     public void setShardId(String shardId) {this.shardId = shardId;}
     public void setRoles(String roles) {this.roles = roles;}
-    public void setCoreNodeName(String coreNodeName) {this.coreNodeName = coreNodeName;}
+    public void setReplicaName(String replicaName) {this.replicaName = replicaName;}
+    @Deprecated
+    public void setCoreNodeName(String coreNodeName) {this.replicaName = coreNodeName;}
     public void setIsTransient(Boolean isTransient) { this.isTransient = isTransient; }
     public void setIsLoadOnStartup(Boolean loadOnStartup) { this.loadOnStartup = loadOnStartup;}
     public void setCollectionConfigName(String name) { this.collectionConfigName = name;}
@@ -99,7 +102,9 @@ public class CoreAdminRequest extends SolrRequest<CoreAdminResponse> {
     public String getCollection() { return collection; }
     public String getShardId() { return shardId; }
     public String getRoles() { return roles; }
-    public String getCoreNodeName() { return coreNodeName; }
+    @Deprecated
+    public String getCoreNodeName() { return replicaName; }
+    public String getReplicaName() { return replicaName; }
     public Boolean getIsLoadOnStartup() { return loadOnStartup; }
     public Boolean getIsTransient() { return isTransient; }
     public String getCollectionConfigName() { return collectionConfigName;}
@@ -156,8 +161,8 @@ public class CoreAdminRequest extends SolrRequest<CoreAdminResponse> {
       if (roles != null) {
         params.set( CoreAdminParams.ROLES, roles);
       }
-      if (coreNodeName != null) {
-        params.set( CoreAdminParams.CORE_NODE_NAME, coreNodeName);
+      if (replicaName != null) {
+        params.set(CommonParams.REPLICA_NAME, replicaName);
       }
 
       if (isTransient != null) {
@@ -196,11 +201,22 @@ public class CoreAdminRequest extends SolrRequest<CoreAdminResponse> {
     public String getNodeName() {
       return nodeName;
     }
-    
+
+    @Deprecated
     public String getCoreNodeName() {
       return coreNodeName;
     }
 
+    @Deprecated
+    public String getReplicaName() {
+      return coreNodeName;
+    }
+
+    public void setReplicaName(String replicaName) {
+      this.coreNodeName = replicaName;
+    }
+
+    @Deprecated
     public void setCoreNodeName(String coreNodeName) {
       this.coreNodeName = coreNodeName;
     }
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterStateUtil.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterStateUtil.java
index 9ce8090..eec2529 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterStateUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterStateUtil.java
@@ -105,14 +105,14 @@ public class ClusterStateUtil {
   }
   
   /**
-   * Wait to see an entry in the ClusterState with a specific coreNodeName and
+   * Wait to see an entry in the ClusterState with a specific replicaName and
    * baseUrl.
    * 
    * @param zkStateReader
    *          to use for ClusterState
    * @param collection
    *          to look in
-   * @param coreNodeName
+   * @param replicaName
    *          to wait for
    * @param baseUrl
    *          to wait for
@@ -121,14 +121,14 @@ public class ClusterStateUtil {
    * @return false if timed out
    */
   public static boolean waitToSeeLiveReplica(ZkStateReader zkStateReader,
-      String collection, String coreNodeName, String baseUrl,
+      String collection, String replicaName, String baseUrl,
       int timeoutInMs) {
     long timeout = System.nanoTime()
         + TimeUnit.NANOSECONDS.convert(timeoutInMs, TimeUnit.MILLISECONDS);
     
     while (System.nanoTime() < timeout) {
       log.debug("waiting to see replica just created live collection={} replica={} baseUrl={}",
-          collection, coreNodeName, baseUrl);
+          collection, replicaName, baseUrl);
       ClusterState clusterState = zkStateReader.getClusterState();
       if (clusterState != null) {
         DocCollection docCollection = clusterState.getCollection(collection);
@@ -140,9 +140,9 @@ public class ClusterStateUtil {
             for (Replica replica : replicas) {
               // on a live node?
               boolean live = clusterState.liveNodesContain(replica.getNodeName());
-              String rcoreNodeName = replica.getName();
+              String rReplicaName = replica.getName();
               String rbaseUrl = replica.getBaseUrl();
-              if (live && coreNodeName.equals(rcoreNodeName)
+              if (live && replicaName.equals(rReplicaName)
                   && baseUrl.equals(rbaseUrl)) {
                 // found it
                 return true;
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 c79168a..318571c 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
@@ -316,12 +316,12 @@ public class DocCollection extends ZkNodeProps implements Iterable<Slice> {
     jsonWriter.write(all);
   }
 
-  public Replica getReplica(String coreNodeName) {
+  public Replica getReplica(String replicaName) {
     if (perReplicaState) {
-      return replicaMap.get(coreNodeName);
+      return replicaMap.get(replicaName);
     }
     for (Slice slice : slices.values()) {
-      Replica replica = slice.getReplica(coreNodeName);
+      Replica replica = slice.getReplica(replicaName);
       if (replica != null) return replica;
     }
     return null;
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/Replica.java b/solr/solrj/src/java/org/apache/solr/common/cloud/Replica.java
index 2c1c6df..0c1d980 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/Replica.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/Replica.java
@@ -258,7 +258,7 @@ public class Replica extends ZkNodeProps implements MapWriter {
     return Objects.hash(name);
   }
 
-  /** Also known as coreNodeName. */
+  /** Also known as replicaName. */
   public String getName() {
     return name;
   }
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java b/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
index 23796fb..1976db0 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
@@ -270,7 +270,7 @@ public class Slice extends ZkNodeProps implements Iterable<Replica> {
   }
 
   /**
-   * Get the map of coreNodeName to replicas for this slice.
+   * Get the map of replicaName to replicas for this slice.
    */
   public Map<String, Replica> getReplicasMap() {
     return replicas;
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index 16b9d72..c222877 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -895,24 +895,24 @@ public class ZkStateReader implements SolrCloseable {
   }
 
 
-  public List<ZkCoreNodeProps> getReplicaProps(String collection, String shardId, String thisCoreNodeName) {
-    return getReplicaProps(collection, shardId, thisCoreNodeName, null);
+  public List<ZkCoreNodeProps> getReplicaProps(String collection, String shardId, String thisReplicaName) {
+    return getReplicaProps(collection, shardId, thisReplicaName, null);
   }
 
-  public List<ZkCoreNodeProps> getReplicaProps(String collection, String shardId, String thisCoreNodeName,
+  public List<ZkCoreNodeProps> getReplicaProps(String collection, String shardId, String thisReplicaName,
                                                Replica.State mustMatchStateFilter) {
-    return getReplicaProps(collection, shardId, thisCoreNodeName, mustMatchStateFilter, null);
+    return getReplicaProps(collection, shardId, thisReplicaName, mustMatchStateFilter, null);
   }
 
-  public List<ZkCoreNodeProps> getReplicaProps(String collection, String shardId, String thisCoreNodeName,
+  public List<ZkCoreNodeProps> getReplicaProps(String collection, String shardId, String thisReplicaName,
                                                Replica.State mustMatchStateFilter, Replica.State mustNotMatchStateFilter) {
     //TODO: We don't need all these getReplicaProps method overloading. Also, it's odd that the default is to return replicas of type TLOG and NRT only
-    return getReplicaProps(collection, shardId, thisCoreNodeName, mustMatchStateFilter, null, EnumSet.of(Replica.Type.TLOG, Replica.Type.NRT));
+    return getReplicaProps(collection, shardId, thisReplicaName, mustMatchStateFilter, null, EnumSet.of(Replica.Type.TLOG, Replica.Type.NRT));
   }
 
-  public List<ZkCoreNodeProps> getReplicaProps(String collection, String shardId, String thisCoreNodeName,
+  public List<ZkCoreNodeProps> getReplicaProps(String collection, String shardId, String thisReplicaName,
                                                Replica.State mustMatchStateFilter, Replica.State mustNotMatchStateFilter, final EnumSet<Replica.Type> acceptReplicaType) {
-    assert thisCoreNodeName != null;
+    assert thisReplicaName != null;
     ClusterState clusterState = this.clusterState;
     if (clusterState == null) {
       return null;
@@ -934,9 +934,9 @@ public class ZkStateReader implements SolrCloseable {
     for (Entry<String, Replica> entry : shardMap.entrySet().stream().filter((e) -> acceptReplicaType.contains(e.getValue().getType())).collect(Collectors.toList())) {
       ZkCoreNodeProps nodeProps = new ZkCoreNodeProps(entry.getValue());
 
-      String coreNodeName = entry.getValue().getName();
+      String replicaName = entry.getValue().getName();
 
-      if (clusterState.liveNodesContain(nodeProps.getNodeName()) && !coreNodeName.equals(thisCoreNodeName)) {
+      if (clusterState.liveNodesContain(nodeProps.getNodeName()) && !replicaName.equals(thisReplicaName)) {
         if (mustMatchStateFilter == null || mustMatchStateFilter == Replica.State.getState(nodeProps.getState())) {
           if (mustNotMatchStateFilter == null || mustNotMatchStateFilter != Replica.State.getState(nodeProps.getState())) {
             nodes.add(nodeProps);
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index 144622c..a9b14a0 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -305,5 +305,7 @@ public interface CommonParams {
 
   String CHILDDOC = "_childDocuments_";
 
+  String REPLICA_NAME = "coreNodeName";
+
 }
 
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java
index 2548e62..d698b39 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java
@@ -91,7 +91,8 @@ public abstract class CoreAdminParams
 
   public static final String REQUESTID = "requestid";
 
-  public static final String CORE_NODE_NAME = "coreNodeName";
+  @Deprecated
+  public static final String CORE_NODE_NAME = CommonParams.REPLICA_NAME;
   
   /** Prefix for core property name=value pair **/
   public final static String PROPERTY_PREFIX = "property.";
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
index df38ff6..d1e8dc1 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
@@ -887,7 +887,7 @@ public class CloudHttp2SolrClientTest extends SolrCloudTestCase {
                  .process(cluster.getSolrClient()).getStatus());
     cluster.waitForActiveCollection(COL, 1, 1);
 
-    // determine the coreNodeName of only current replica
+    // determine the replicaName of only current replica
     Collection<Slice> slices = cluster.getSolrClient().getZkStateReader().getClusterState().getCollection(COL).getSlices();
     assertEquals(1, slices.size()); // sanity check
     Slice slice = slices.iterator().next();
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 e156607..1d2a59d 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
@@ -880,7 +880,7 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
                  .process(cluster.getSolrClient()).getStatus());
     cluster.waitForActiveCollection(COL, 1, 1);
 
-    // determine the coreNodeName of only current replica
+    // determine the replicaName of only current replica
     Collection<Slice> slices = cluster.getSolrClient().getZkStateReader().getClusterState().getCollection(COL).getSlices();
     assertEquals(1, slices.size()); // sanity check
     Slice slice = slices.iterator().next();
diff --git a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
index ee4d89b..44cd3ae 100644
--- a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
@@ -59,6 +59,7 @@ import org.apache.solr.client.solrj.response.UpdateResponse;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrInputDocument;
+import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.ExecutorUtil;
@@ -460,7 +461,7 @@ public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 {
     return createJetty(solrHome, dataDir, shardList, solrConfigOverride, schemaOverride, useExplicitNodeNames);
   }
   
-  public JettySolrRunner createJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride, boolean explicitCoreNodeName) throws Exception {
+  public JettySolrRunner createJetty(File solrHome, String dataDir, String shardList, String solrConfigOverride, String schemaOverride, boolean explicitReplicaName) throws Exception {
 
     Properties props = new Properties();
     if (solrConfigOverride != null)
@@ -472,8 +473,8 @@ public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 {
     if (dataDir != null) {
       props.setProperty("solr.data.dir", dataDir);
     }
-    if (explicitCoreNodeName) {
-      props.setProperty("coreNodeName", Integer.toString(nodeCnt.incrementAndGet()));
+    if (explicitReplicaName) {
+      props.setProperty(CommonParams.REPLICA_NAME, Integer.toString(nodeCnt.incrementAndGet()));
     }
     props.setProperty("coreRootDirectory", solrHome.toPath().resolve("cores").toString());
 
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java
index 1a5bf98..fda8587 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java
@@ -254,13 +254,13 @@ public abstract class AbstractDistribZkTestBase extends BaseDistributedSearchTes
     });
   }
 
-  public static void verifyReplicaStatus(ZkStateReader reader, String collection, String shard, String coreNodeName,
+  public static void verifyReplicaStatus(ZkStateReader reader, String collection, String shard, String replicaName,
       Replica.State expectedState) throws InterruptedException, TimeoutException {
-    log.info("verifyReplicaStatus ({}) shard={} coreNodeName={}", collection, shard, coreNodeName);
+    log.info("verifyReplicaStatus ({}) shard={} replicaName={}", collection, shard, replicaName);
     reader.waitForState(collection, 15000, TimeUnit.MILLISECONDS,
         (collectionState) -> collectionState != null && collectionState.getSlice(shard) != null
-            && collectionState.getSlice(shard).getReplicasMap().get(coreNodeName) != null
-            && collectionState.getSlice(shard).getReplicasMap().get(coreNodeName).getState() == expectedState);
+            && collectionState.getSlice(shard).getReplicasMap().get(replicaName) != null
+            && collectionState.getSlice(shard).getReplicasMap().get(replicaName).getState() == expectedState);
   }
 
   protected static void assertAllActive(String collection, ZkStateReader zkStateReader)
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
index 662e73c..8f25233 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
@@ -159,7 +159,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
   public static class CloudJettyRunner {
     public JettySolrRunner jetty;
     public String nodeName;
-    public String coreNodeName;
+    public String replicaName;
     public String url;
     public CloudSolrServerClient client;
     public ZkNodeProps info;
@@ -877,7 +877,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
             cjr.jetty = jetty;
             cjr.info = replica;
             cjr.nodeName = replica.getStr(ZkStateReader.NODE_NAME_PROP);
-            cjr.coreNodeName = entry.getKey();
+            cjr.replicaName = entry.getKey();
             // TODO: no trailing slash on end desired, so replica.getCoreUrl is not applicable here
             cjr.url = replica.getBaseUrl() + "/" + replica.getStr(ZkStateReader.CORE_NAME_PROP);
             cjr.client = findClientByPort(port, theClients);
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java b/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java
index 7dfdc36..d73cf35 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java
@@ -406,9 +406,9 @@ public class ChaosMonkey {
     
     Slice slice = docCollection.getSlice(sliceName);
     
-    ZkNodeProps props = slice.getReplicasMap().get(cjetty.coreNodeName);
+    ZkNodeProps props = slice.getReplicasMap().get(cjetty.replicaName);
     if (props == null) {
-      throw new RuntimeException("shard name " + cjetty.coreNodeName + " not found in " + slice.getReplicasMap().keySet());
+      throw new RuntimeException("shard name " + cjetty.replicaName + " not found in " + slice.getReplicasMap().keySet());
     }
     return Replica.Type.valueOf(props.getStr(ZkStateReader.REPLICA_TYPE));
   }
@@ -424,9 +424,9 @@ public class ChaosMonkey {
       
       Slice slice = docCollection.getSlice(sliceName);
       
-      ZkNodeProps props = slice.getReplicasMap().get(cloudJetty.coreNodeName);
+      ZkNodeProps props = slice.getReplicasMap().get(cloudJetty.replicaName);
       if (props == null) {
-        throw new RuntimeException("shard name " + cloudJetty.coreNodeName + " not found in " + slice.getReplicasMap().keySet());
+        throw new RuntimeException("shard name " + cloudJetty.replicaName + " not found in " + slice.getReplicasMap().keySet());
       }
       
       final Replica.State state = Replica.State.getState(props.getStr(ZkStateReader.STATE_PROP));
@@ -453,9 +453,9 @@ public class ChaosMonkey {
       
       Slice slice = docCollection.getSlice(sliceName);
       
-      ZkNodeProps props = slice.getReplicasMap().get(cloudJetty.coreNodeName);
+      ZkNodeProps props = slice.getReplicasMap().get(cloudJetty.replicaName);
       if (props == null) {
-        throw new RuntimeException("shard name " + cloudJetty.coreNodeName + " not found in " + slice.getReplicasMap().keySet());
+        throw new RuntimeException("shard name " + cloudJetty.replicaName + " not found in " + slice.getReplicasMap().keySet());
       }
       
       final Replica.State state = Replica.State.getState(props.getStr(ZkStateReader.STATE_PROP));
diff --git a/solr/test-framework/src/java/org/apache/solr/update/processor/UpdateProcessorTestBase.java b/solr/test-framework/src/java/org/apache/solr/update/processor/UpdateProcessorTestBase.java
index d3aa979..21c4972 100644
--- a/solr/test-framework/src/java/org/apache/solr/update/processor/UpdateProcessorTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/update/processor/UpdateProcessorTestBase.java
@@ -140,7 +140,7 @@ public class UpdateProcessorTestBase extends SolrTestCaseJ4 {
   /**
    * Convenience method for building up SolrInputDocuments
    */
-  final SolrInputDocument doc(SolrInputField... fields) {
+  protected final SolrInputDocument doc(SolrInputField... fields) {
     SolrInputDocument d = new SolrInputDocument();
     for (SolrInputField f : fields) {
       d.put(f.getName(), f);
@@ -162,7 +162,7 @@ public class UpdateProcessorTestBase extends SolrTestCaseJ4 {
   /**
    * Convenience method for building up SolrInputFields with default boost
    */
-  final SolrInputField f(String name, Object... values) {
+  protected final SolrInputField f(String name, Object... values) {
     return field(name, values);
   }
 }