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

ingester: support chunk transfers on ingester shutdown. #794

Merged
merged 6 commits into from
Jul 26, 2019

Conversation

rfratto
Copy link
Member

@rfratto rfratto commented Jul 22, 2019

This commit introduces chunk transfers, borrowing the mechanism from Cortex's implementation: when an ingester is shut down with claim on rollout enabled, the ingester will find a pending ingester and transfer all of its chunks to it.

When the ingester is being shut down, it is switch to a read-only mode where only Query and Label operations are supported. Push will return an error.

TODO:

  • Add tests for transfers
  • Clean up code

This commit introduces chunk transfers, borrowing the mechanism from
Cortex's implementation: when an ingester is shut down with claim
on rollout enabled, the ingester will find a pending ingester and
transfer all of its chunks to it.
Copy link
Member Author

@rfratto rfratto left a comment

Choose a reason for hiding this comment

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

This is ready for review; the only thing I'm not sure about here is my changes to logproto.proto - it feels weird to add a new service just for transferring chunks with four new messages types. WDYT @Kuqd @slim-bean?

@rfratto rfratto marked this pull request as ready for review July 23, 2019 14:20
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM ! Great PR.

Quick Question: Will this cause error to be logged when running a single ingester ? or the Lifecycler know how many ingesters are in the replicaset and won't trigger transfer for those type of deployment ?

@rfratto
Copy link
Member Author

rfratto commented Jul 25, 2019

thanks! if there's only one ingester in the ring the user would probably be running the ingesters with claim_on_rollout: false in the lifecycler config; as long as that's false, none of this code will be hit

@rfratto
Copy link
Member Author

rfratto commented Jul 25, 2019

I'll merge this first thing in the morning

@cyriltovena
Copy link
Contributor

If we have some doc on ingesters, see if you can add a quick paragraph about transfers that would be useful please.

@rfratto rfratto merged commit d21c30d into grafana:master Jul 26, 2019
@rfratto rfratto deleted the forward-ingester-chunks branch July 26, 2019 13:36
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.

2 participants