File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
server/src/main/java/org/elasticsearch/cluster Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 99package org .elasticsearch .cluster ;
1010
1111import org .elasticsearch .ElasticsearchException ;
12+ import org .elasticsearch .action .support .master .TransportMasterNodeAction ;
13+ import org .elasticsearch .cluster .coordination .FailedToCommitClusterStateException ;
1214import org .elasticsearch .common .io .stream .StreamInput ;
1315
1416import java .io .IOException ;
1517
1618/**
17- * Exception which indicates that an operation failed because the node stopped being the elected master.
19+ * Exception indicating that a cluster state update operation failed because the node stopped being the elected master.
20+ * Since this exception is thrown prior to the cluster state publication, it should only be used when the cluster state update
21+ * <i>definitely</i> did not happen, and there is no possibility the next master committed the cluster state update.
22+ *
23+ * This is different from {@link FailedToCommitClusterStateException}.
24+ *
25+ * This exception is retryable within {@link TransportMasterNodeAction}.
1826 */
1927public class NotMasterException extends ElasticsearchException {
2028
Original file line number Diff line number Diff line change 99package org .elasticsearch .cluster .coordination ;
1010
1111import org .elasticsearch .ElasticsearchException ;
12+ import org .elasticsearch .action .support .master .TransportMasterNodeAction ;
13+ import org .elasticsearch .cluster .NotMasterException ;
1214import org .elasticsearch .common .io .stream .StreamInput ;
1315
1416import java .io .IOException ;
1517
1618/**
1719 * Thrown when a cluster state publication fails to commit the new cluster state. If publication fails then a new master is elected but the
18- * update might or might not take effect, depending on whether or not the newly-elected master accepted the published state that failed to
19- * be committed.
20+ * update might or might not take effect, depending on whether the newly-elected master accepted the published state that failed to
21+ * be committed. This exception should only be used when there is <i>ambiguity</i> whether a state update took effect or not.
22+ *
23+ * This is different from {@link NotMasterException} where we know for certain that a state update never took effect.
24+ *
25+ * This exception is retryable within {@link TransportMasterNodeAction}.
2026 *
2127 * See {@link ClusterStatePublisher} for more details.
2228 */
You can’t perform that action at this time.
0 commit comments