SAMZA-2663: Handle job model expiration and new job model flows for multiple incomplete rebalances#1528
Merged
mynameborat merged 1 commit intoapache:masterfrom Sep 11, 2021
Conversation
…ultiple incomplete rebalances
bringhurst
added a commit
to bringhurst/samza
that referenced
this pull request
Sep 27, 2021
…ws for multiple incomplete rebalances (apache#1528)" This reverts commit 516a40d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem:
As part of SAMZA-2638, we introduced skipping container restart and stops on no changes to work assignment for processors across rebalances. However, we only update the active job model with the proposed job model on starting the container as part of
onNewJobModel. This leads to a scenario where the processor is stopped but the future rebalances assume the container is still running. More information on scenario below.Description:
Imagine the quorum is in steady state with job model version v1. A new rebalance occurs and the leader generates v2. Processor P1 has changes in work assignment and as a result stops the container as part of job model expiration. However, in the event of the rebalance being unsuccessful (barrier times out), a new rebalance occurs which generates a job model version v3. In the scenario where work assignment for P1 in v3 is same as v1, then the state transition assumes the processor hasn't stopped the container and proceeds to do an no-op.
Changes:
onNewJobModeltriggers new job model as long as the active job model has been expiredcheckJobModelExpiredflow.Test:
API Changes: None
Upgrade Instructions: None