Github user tflobbe commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/169#discussion_r107959546
--- Diff: solr/core/src/java/org/apache/solr/handler/IndexFetcher.java ---
@@ -161,6 +163,52 @@
private Integer soTimeout;
+ private static final String INTERRUPT_RESPONSE_MESSAGE = "Interrupted
while waiting for modify lock";
+
+ public static class IndexFetchResult {
+ private final String message;
+ private final boolean successful;
+ private final Throwable exception;
+
+ public static final String FAILED_BY_INTERRUPT_MESSAGE = "Fetching
index failed by interrupt";
+ public static final String FAILED_BY_EXCEPTION_MESSAGE = "Fetching
index failed by exception";
+
+ /** pre-defined results */
+ public static final IndexFetchResult ALREADY_IN_SYNC = new
IndexFetchResult("Local index commit is already in sync with peer", true, null);
+ public static final IndexFetchResult INDEX_FETCH_FAILURE = new
IndexFetchResult("Fetching lastest index is failed", false, null);
+ public static final IndexFetchResult INDEX_FETCH_SUCCESS = new
IndexFetchResult("Fetching latest index is successful", true, null);
+ public static final IndexFetchResult LOCK_OBTAIN_FAILED = new
IndexFetchResult("Obtaining SnapPuller lock failed", false, null);
+ public static final IndexFetchResult MASTER_VERSION_ZERO = new
IndexFetchResult("Index in peer is empty and never committed yet", true, null);
+ public static final IndexFetchResult NO_INDEX_COMMIT_EXIST = new
IndexFetchResult("No IndexCommit in local index", false, null);
+ public static final IndexFetchResult PEER_INDEX_COMMIT_DELETED = new
IndexFetchResult("No files to download because IndexCommit in peer was
deleted", false, null);
+ public static final IndexFetchResult LOCAL_ACTIVITY_DURING_REPLICATION
= new IndexFetchResult("Local index modification during replication", false,
null);
+ public static final IndexFetchResult CORE_NODE_IS_NOT_LEADER = new
IndexFetchResult("Core Name Name Equals Leader Replica Name", false, null);
--- End diff --
Yes, those sound good. I personally like **EXPECTING_NON_LEADER** better
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]