[Server] Stuck consumer task would kill SITs having issues post online #981
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Background
Today if an unrecoverable exception occurs during current version RT ingestion, the ingest task unsubscribes and then sits around. This is a terminal stale state. That's the state model semantic we have today, that is, we don't put a replica into ERROR state if it's being online.
Recently, we observed that replicas stopped ingestion after being online due to a dependency outage. In order to recover from this, our oncall had to do manual host deployment/fleet-wide restart so these hosts can restart the workflow and ingest data again.
Goal
In this PR, we are trying to add auto-recovery mechanism for such tasks so oncalls don't have to do it manually
Technical details
We have several options to implement this.
ERROR
or a new state afterCOMPLETED
so helix can act on it, butCOMPLETED
will no longer be a terminal state. It鈥檚 okay to change it tho but the cost outweighs the gain (unless we foresee we will do this soon), given it's relatively rare to get into unrecoverable state after being online.How was this PR tested?
unit tests
Does this PR introduce any user-facing changes?