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
Restore the key generator on replay #6285
Conversation
0e16b4d
to
d9a4a1e
Compare
Update: I added a third commit to ignore records from other partitions when restoring the key generator on replay. This happens when distributing a deployment to other partitions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and simple fix in the third commit. I generally like the changes, and everything seems correct. However, it's relative complex wording in an already complex context, so I've made some suggestions around understandability.
engine/src/main/java/io/zeebe/engine/processing/streamprocessor/ReProcessingStateMachine.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/io/zeebe/engine/processing/streamprocessor/ReProcessingStateMachine.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/io/zeebe/engine/processing/streamprocessor/ReProcessingStateMachine.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/io/zeebe/engine/processing/streamprocessor/ReProcessingStateMachine.java
Show resolved
Hide resolved
engine/src/main/java/io/zeebe/engine/processing/streamprocessor/ReProcessingStateMachine.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/io/zeebe/engine/processing/streamprocessor/ReProcessingStateMachine.java
Outdated
Show resolved
Hide resolved
@korthout I applied your hints. Please have a second look :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. LGTM 🧸
* reset the key generator after replay to the highest key that was written on the stream * update the key generator after skipping a command on replay. the key generator is used by not yet migrated processors * ignore records from other partitions when restoring the key generator on replay * extract an interface from the ZeebeState to avoid that internal controls (key generator, last processed state) are exposed
9c08bec
to
7681738
Compare
bors r+ |
Build succeeded: |
It looks like this caused a performance drop of ~25 WI/s - do we have any ideas why? |
No 🤔 |
Forgot to update, this PR didn't cause the changes - we found that the changes which caused a dip occurred in the following: Quoting from Slack: so i run several benchmarks, and what i see is slight dips over time it seems. given that we have these merge commits in chronological order: 359aec0, 2ac8a25, f0f91fd, d73ae31 359aec0 does ~116 WI/s Between 2ac8a25 and f0f91fd we have:
Between f0f91fd and d73ae31 we have:
|
As of now I don't think it's dramatic enough to look into - we expect that in our current intermediate state things may be a little slower - but we should definitely keep an eye out when we run our weekly load tests, and probably take a bit of time at the end to profile/optimize. |
Description
Hints for the reviewer:
StreamProcessorReplayTest#shouldRestoreKeyGeneratorAfterSkippingCommand()
will be removed with the migration logic after all processors are migratedRelated issues
closes #6164
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/0.25
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation: