Skip to content
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

Added generic cluster state update ack mechanism #3800

Closed
wants to merge 5 commits into from

Conversation

javanna
Copy link
Member

@javanna javanna commented Sep 28, 2013

Added new AckedClusterStateUpdateTask interface that can be used to submit cluster state update tasks and allows actions to be notified back when a set of (configurable) nodes have acknowledged the cluster state update. Supports a configurable timeout, so that we wait for acknowledgement for a limited amount of time (will be provided in the request as it curently happens, default 10s).

Internally, a low level AckListener is created (InternalClusterService) and passed to the publish method, so that it can be notified whenever each node responds to the publish request. Once all the expected nodes have responded or the timeoeout has expired, the AckListener notifies the action which will return adding the proper acknowledged flag to the response.

Ideally, this new mechanism will gradually replace the existing ones based on custom endpoints and notifications (per api).

Once we get this in I'll start adding this new mechanism to the apis that don't currently support acknowledgements when changing the cluster state (e.g. put and delete warmer etc.).

Closes #3786

@ghost ghost assigned javanna Oct 5, 2013
@@ -87,11 +96,28 @@ public DeleteWarmerRequest indices(String[] indices) {
return indices;
}

public DeleteWarmerRequest timeout(String timeout) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should this have a @Override annotation?

javanna and others added 5 commits October 15, 2013 10:27
Added new AckedClusterStateUpdateTask interface that can be used to submit cluster state update tasks and allows actions to be notified back when a set of (configurable) nodes have acknowledged the cluster state update. Supports a configurable timeout, so that we wait for acknowledgement for a limited amount of time (will be provided in the request as it curently happens, default 10s).

Internally, a low level AckListener is created (InternalClusterService) and passed to the publish method, so that it can be notified whenever each node responds to the publish request. Once all the expected nodes have responded or the timeoeout has expired, the AckListener notifies the action which will return adding the proper acknowledged flag to the response.

Ideally, this new mechanism will gradually replace the existing ones based on custom endpoints and notifications (per api).

Closes elastic#3786
Added support for acknowledgements in put warmer api using the generic mechanism introduced in elastic#3786

Closes elastic#3831
Added support for acknowledgements in delete warmer api using the generic mechanism introduced in#3786

Closes elastic#3833
@javanna
Copy link
Member Author

javanna commented Oct 15, 2013

Merged and backported to 0.90

@javanna javanna closed this Oct 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generic cluster state update ack mechanism
2 participants