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

Add global checkpoint polling to cross-cluster replication #32651

Closed
3 tasks done
jasontedor opened this issue Aug 6, 2018 · 5 comments
Closed
3 tasks done

Add global checkpoint polling to cross-cluster replication #32651

jasontedor opened this issue Aug 6, 2018 · 5 comments
Assignees
Labels
:Distributed Indexing/CCR Issues around the Cross Cluster State Replication features Meta

Comments

@jasontedor
Copy link
Member

jasontedor commented Aug 6, 2018

Today cross-cluster replication works by submitting read requests to the leader shard. When there are no operations in the response, we schedule a follow-up and repeatedly poll on a scheduled delay until we receive operations in the response. Our goal is add an endpoint for a remote cluster to listen for changes in the global checkpoint on the leader. To do this, we will make the following changes:

We will make the first of these two changes in master/6.x, and the third change will be made on the ccr feature branch.

Relates #30086

@jasontedor jasontedor added the :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features label Aug 6, 2018
@jasontedor jasontedor self-assigned this Aug 6, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@bleskes
Copy link
Contributor

bleskes commented Aug 7, 2018

@jasontedor my original thinking was to build this into the read changes requests, looking forward to a changes API. Reading this description, it seems your thinking is to have a dedicated action. Can you clarify?

@jasontedor
Copy link
Member Author

@bleskes Yes, I was thinking a separate action. Are you thinking another flag on the shard changes request that designates the request can go into a poll mode?

@bleskes
Copy link
Contributor

bleskes commented Aug 7, 2018

@jasontedor My not-so-well-thought-out idea was to initially go into "wait mode" iff the local shard can't serve any ops for the incoming request. This amounts to the fromSeqNo be equal to the global checkpoint + 1. Later we can introduces better flags (which imo will be more relevant for a changes api) like "wait for at least x ops to arrive but no longer than x time".

@jasontedor
Copy link
Member Author

I will need to look into this but this concerns me because I think that it means we can end up with multiple outstanding polls on the follower side and I think that we should avoid that (mostly for simplicity, the callbacks are not particularly expensive to hold on to for the life of a poll).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/CCR Issues around the Cross Cluster State Replication features Meta
Projects
None yet
Development

No branches or pull requests

3 participants