MarcusSorealheis commented on a change in pull request #1712:
URL: https://github.com/apache/lucene-solr/pull/1712#discussion_r464863669
##########
File path: solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
##########
@@ -404,35 +404,35 @@ IndexFetchResult fetchLatestIndex(boolean
forceReplication, boolean forceCoreRel
}
return IndexFetchResult.LEADER_IS_NOT_ACTIVE;
}
- if (!replica.getCoreUrl().equals(masterUrl)) {
- masterUrl = replica.getCoreUrl();
- log.info("Updated masterUrl to {}", masterUrl);
+ if (!replica.getCoreUrl().equals(primaryUrl)) {
+ primaryUrl = replica.getCoreUrl();
+ log.info("Updated primaryUrl to {}", primaryUrl);
// TODO: Do we need to set forceReplication = true?
} else {
- log.debug("masterUrl didn't change");
+ log.debug("primaryUrl didn't change");
}
}
- //get the current 'replicateable' index version in the master
+ //get the current 'replicateable' index version in the primary
@SuppressWarnings({"rawtypes"})
NamedList response;
try {
response = getLatestVersion();
} catch (Exception e) {
final String errorMsg = e.toString();
if (!Strings.isNullOrEmpty(errorMsg) &&
errorMsg.contains(INTERRUPT_RESPONSE_MESSAGE)) {
- log.warn("Master at: {} is not available. Index fetch failed by
interrupt. Exception: {}", masterUrl, errorMsg);
+ log.warn("Primary at: {} is not available. Index fetch failed by
interrupt. Exception: {}", primaryUrl, errorMsg);
return new
IndexFetchResult(IndexFetchResult.FAILED_BY_INTERRUPT_MESSAGE, false, e);
} else {
- log.warn("Master at: {} is not available. Index fetch failed by
exception: {}", masterUrl, errorMsg);
+ log.warn("Primary at: {} is not available. Index fetch failed by
exception: {}", primaryUrl, errorMsg);
return new
IndexFetchResult(IndexFetchResult.FAILED_BY_EXCEPTION_MESSAGE, false, e);
}
}
long latestVersion = (Long) response.get(CMD_INDEX_VERSION);
long latestGeneration = (Long) response.get(GENERATION);
- log.info("Master's generation: {}", latestGeneration);
- log.info("Master's version: {}", latestVersion);
+ log.info("Primary's generation: {}", latestGeneration);
+ log.info("Primary's version: {}", latestVersion);
Review comment:
Shawn suggested that we shouldn't use the same terminology for the
legacy architecture. I've updated the first PR in any event. At this time,
keeping the same terminology seems to be the right way to go unless I rewrite
the replication handler. There's an argument for that because I'm sure there
are areas where we could improve, but it won't happen in this PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]