-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-15094: Replace all code references of coreNodeName to replicaName #2234
base: master
Are you sure you want to change the base?
Changes from 2 commits
21be96d
bcab925
db9f16b
6b43140
66ad639
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the log on line 80, and the variable name "cnn" as well |
||
* + throw exception if it has been. | ||
*/ | ||
public static void checkSharedFSFailoverReplaced(CoreContainer cc, CoreDescriptor desc) { | ||
|
@@ -103,12 +103,12 @@ public static void checkSharedFSFailoverReplaced(CoreContainer cc, CoreDescripto | |
} | ||
} | ||
|
||
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; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo :) missing p |
||
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; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,7 @@ public static interface RecoveryListener { | |
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 @@ protected RecoveryStrategy(CoreContainer cc, CoreDescriptor cd, RecoveryListener | |
zkController = cc.getZkController(); | ||
zkStateReader = zkController.getZkStateReader(); | ||
baseUrl = zkController.getBaseUrl(); | ||
coreZkNodeName = cd.getCloudDescriptor().getCoreNodeName(); | ||
replicaName = cd.getCloudDescriptor().getCoreNodeName(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update so we're not using deprecated method |
||
replicaType = cd.getCloudDescriptor().getReplicaType(); | ||
} | ||
|
||
|
@@ -193,7 +193,7 @@ final public void close() { | |
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 @@ final private void sendPrepRecoveryCmd(String leaderBaseUrl, String leaderCoreNa | |
WaitForState prepCmd = new WaitForState(); | ||
prepCmd.setCoreName(leaderCoreName); | ||
prepCmd.setNodeName(zkController.getNodeName()); | ||
prepCmd.setCoreNodeName(coreZkNodeName); | ||
prepCmd.setCoreNodeName(replicaName); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use new method |
||
prepCmd.setState(Replica.State.RECOVERING); | ||
prepCmd.setCheckLive(true); | ||
prepCmd.setOnlyIfLeader(true); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename
nodeName
internally here as well? I think it's a little misleading