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

Mysterious flush of underutilised chunks 1hr after ingester rollout #467

Closed
awh opened this issue Jun 19, 2017 · 14 comments · Fixed by #841
Closed

Mysterious flush of underutilised chunks 1hr after ingester rollout #467

awh opened this issue Jun 19, 2017 · 14 comments · Fixed by #841

Comments

@awh
Copy link
Contributor

awh commented Jun 19, 2017

On the 15th of June:
screenshot from 2017-06-19 17-23-20

On the 19th of June:
screenshot from 2017-06-19 17-23-33

Both of these happened approximately one hour after an ingester upgrade in which chunks were successfully transferred from terminating ingesters. Chunk max idle is 1h, possibly related?

CC @tomwilkie any thoughts?

@tomwilkie
Copy link
Contributor

tomwilkie commented Jun 19, 2017 via email

@awh
Copy link
Contributor Author

awh commented Jun 19, 2017

Oh - could those be series from metrics scraped from the ingesters which have now terminated?

@awh
Copy link
Contributor Author

awh commented Jun 20, 2017

Querying for {job="cortex/ingester"} returns only 1406 time series.

@tomwilkie
Copy link
Contributor

I assume this was part of a rolling upgrade of all of cortex? What does count({job=~"cortex/.*"}) return?

@awh
Copy link
Contributor Author

awh commented Jun 20, 2017

9862, and no, in both cases it was just the ingester that was rolled out (in the first instance we had upgraded all of cortex but delayed the ingester whilst we understood #458 so it was eventually done in isolation, and in the second instance we only needed to do the ingester to deploy #460)

@awh
Copy link
Contributor Author

awh commented Jun 20, 2017

It's almost like the state reconstructed from transferred chunks in the new ingesters is not identical to that in the old, and so they are making different decisions about what should be flushed...

@awh
Copy link
Contributor Author

awh commented Jun 20, 2017

This is also happening on rolling reboots.

@leth
Copy link
Contributor

leth commented Jun 20, 2017

As @awh said, we just had a single ingester replaced, due to a node reboot, and the queue peaked at 600K

@leth leth closed this as completed Jun 30, 2017
@leth leth reopened this Jun 30, 2017
@leth
Copy link
Contributor

leth commented Jun 30, 2017

Oops

@leth
Copy link
Contributor

leth commented Aug 3, 2017

I had a brainwave last night; during ingester handover the old and new ingesters are no longer in ACTIVE state, so the distributor will pick an extra ingester, which was not selected before the handover started.
After the handover has finished, it will return to selecting ingester covering the original part of the ring (the new ingester), and the extra ingester will no longer be selected.
After $idleChunkTime the extra ingester will flush these idle chunks.

@leth
Copy link
Contributor

leth commented Aug 3, 2017

To prevent the ingester picker from picking a temporary node (and allow N concurrent upgrades), we'd need to ensure replication - quorum - N > 0, and allow the picker to select fewer nodes during a handover (quorum < X < replication).

@tomwilkie
Copy link
Contributor

tomwilkie commented Aug 3, 2017 via email

@awh
Copy link
Contributor Author

awh commented Aug 3, 2017

Aye, good spot 👏

@stale
Copy link

stale bot commented Feb 3, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants