[
https://issues.apache.org/jira/browse/SOLR-10249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15937001#comment-15937001
]
ASF GitHub Bot commented on SOLR-10249:
---------------------------------------
Github user dsmiley commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/169#discussion_r107512860
--- Diff: solr/core/src/java/org/apache/solr/handler/IndexFetcher.java ---
@@ -311,7 +359,7 @@ boolean fetchLatestIndex(boolean forceReplication,
boolean forceCoreReload) thro
Replica replica = getLeaderReplica();
CloudDescriptor cd =
solrCore.getCoreDescriptor().getCloudDescriptor();
if (cd.getCoreNodeName().equals(replica.getName())) {
- return false;
+ return IndexFetchResult.CORE_NODE_IS_REPLICA;
--- End diff --
Maybe call this NOT_LEADER ? Even a leader is a replica (it's the _role_ a
replica plays). Granted many of us promote this ambiguity because we haven't
clearly/consistently labelled a non-leader, e.g. a follower.
> Allow index fetching to return a detailed result instead of a true/false value
> ------------------------------------------------------------------------------
>
> Key: SOLR-10249
> URL: https://issues.apache.org/jira/browse/SOLR-10249
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: replication (java)
> Affects Versions: 6.4.1
> Environment: Any
> Reporter: Jeff Miller
> Priority: Trivial
> Labels: easyfix, newbie
> Fix For: 6.5
>
> Original Estimate: 3h
> Remaining Estimate: 3h
>
> This gives us the ability to see into why a replication might of failed and
> act on it if we need to. We use this enhancement for logging conditions so
> we can quantify what is happening with replication, get success rates, etc.
> The idea is to create a public static class IndexFetchResult as an inner
> class to IndexFetcher that has strings that hold statuses that could occur
> while fetching an index.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]