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

Preserve ingester state on restart #6301

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alexqyle
Copy link
Contributor

@alexqyle alexqyle commented Nov 1, 2024

What this PR does:

Since READONLY state was introduced, ingester would be put back on ACTIVE state after restart. Because the state is hard coded in lifecycler. This PR would preserve ring state in token file right before shutting down and during initialization of lifecycler, state would be restored by reading previous state from token file.

Which issue(s) this PR fixes:
NA

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

…oin ring with previous state

Signed-off-by: Alex Le <leqiyue@amazon.com>
Signed-off-by: Alex Le <leqiyue@amazon.com>
@@ -911,7 +961,9 @@ func (i *Lifecycler) changeState(ctx context.Context, state InstanceState) error
if !((currState == PENDING && state == JOINING) || // triggered by TransferChunks at the beginning
(currState == JOINING && state == PENDING) || // triggered by TransferChunks on failure
(currState == JOINING && state == ACTIVE) || // triggered by TransferChunks on success
(currState == JOINING && state == READONLY) || // triggered by TransferChunks on success
Copy link
Member

Choose a reason for hiding this comment

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

Can we update those comments? TransferChunks is from the old chunks store.

Signed-off-by: Alex Le <leqiyue@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants