-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Refactor ShardFailure listener infrastructure #14206
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
Refactor ShardFailure listener infrastructure #14206
Conversation
Today we leak the notion of an engine outside of the shard abstraction which is not desirable. This commit refactors the infrastrucutre to use use already existing interfaces to communicate if a shard has failed and prevents engine private classes to be implemented on a higher level. This change is purely cosmentical...
@@ -167,7 +166,7 @@ | |||
private final MeanMetric refreshMetric = new MeanMetric(); | |||
private final MeanMetric flushMetric = new MeanMetric(); | |||
|
|||
private final ShardEngineFailListener failedEngineListener = new ShardEngineFailListener(); | |||
private final ShardEngineFailListener engineEventListener = new ShardEngineFailListener(); |
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.
nit: since we're moving away from the word fail in the name, can we rename ShardEngineFailListener
to ShardEngineEventListener
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.
the shard end was not intended to be generic... I left that in here on purpose
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.
ah wrong I misunderstood... fixing
LGTM. Left one minor comment (next to trivial stuff) about null protection in IndicesClusterStateService |
pushed a new commit adressing all comments and I also improved the situation if indexShard is null |
public static final class ShardFailure { | ||
public final ShardRouting routing; | ||
public final String reason; | ||
@Nullable |
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.
thanks.
LGTM. Thx @s1monw |
Refactor ShardFailure listener infrastructure
Today we leak the notion of an engine outside of the shard abstraction
which is not desirable. This commit refactors the infrastrucutre to use
use already existing interfaces to communicate if a shard has failed and
prevents engine private classes to be implemented on a higher level.
This change is purely cosmentical...