Skip to content

Conversation

@jasontedor
Copy link
Member

This commit adds a listener mechanism for executing callbacks when
exceptional situations occur sending a shard failure message to the
master. The two types of exceptional situations that can occur are if
the master is not known and if the transport request exception handler
is invoked for any reason after sending the shard failed request to the
master. This commit only adds the infrastructure for executing
callbacks when one of these exceptional situations occur; no effort is
made to properly handle the exceptional situations. Some unit tests are
added for ShardStateAction to test that the listener infrastructure is
correct.

Relates #14252

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if the ReplicaPhase shouldn't implement the ShardStateActionListener interface it self, which will make things simpler and save on the param.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I exposed it as a parameter to hook into for the testing that I added in TransportReplicationActionTests. However this might not be necessary and we can go with the approach that you suggest depending on how we respond to your comment regarding moving the initial testing out of TransportReplicationActionTests. I'll return to this after addressing the other item.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the tests in 00310d112427b9f8fae67fc7fba05473f4aa966b and removed the field in a02571dbb8b6421c59e547857dbbb3d169697e66.

@bleskes
Copy link
Contributor

bleskes commented Oct 27, 2015

Great start. Left some comments.

@jasontedor
Copy link
Member Author

I've pushed commits responding to your comments. Thanks for the initial review @bleskes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to make these methods default impl empty body?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@s1monw Added in 0c20e8f6eafc63c53e4981de82eae3bd129c4538.

@bleskes
Copy link
Contributor

bleskes commented Oct 28, 2015

LGTM. Thx @jasontedor

This commit adds a listener mechanism for executing callbacks when
exceptional situations occur sending a shard failure message to the
master. The two types of exceptional situations that can occur are if
the master is not known and if the transport request exception handler
is invoked for any reason after sending the shard failed request to the
master. This commit only adds the infrastructure for executing
callbacks when one of these exceptional situations occur; no effort is
made to properly handle the exceptional situations. Some unit tests are
added for ShardStateAction to test that the listener infrastructure is
correct.

Relates #14252
@jasontedor jasontedor removed the review label Oct 28, 2015
jasontedor added a commit that referenced this pull request Oct 28, 2015
Add listener mechanism for failures to send shard failed
@jasontedor jasontedor merged commit df4c7c7 into elastic:master Oct 28, 2015
@jasontedor jasontedor deleted the shard-failed-listener branch October 28, 2015 10:39
@jasontedor
Copy link
Member Author

Rebased on master, squashed, and merged into master. Thanks for reviewing @bleskes.

@jasontedor jasontedor mentioned this pull request Nov 11, 2015
9 tasks
@clintongormley clintongormley added :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. and removed :Cluster labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. >enhancement resiliency v5.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants