-
Notifications
You must be signed in to change notification settings - Fork 571
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
[Backport stable/1.3] Correctly truncate a job activation batch if it will not fit in the dispatcher #8832
Merged
Conversation
This file contains 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
Use `int` type instead of `long` for events/records. Under the hood, we always use `int` and not `long`, simply widening the values to return longs. It seemed unnecessary in the end, especially since we always deal with the `ByteBuffer` type in the end, which only allows buffers with up to `Integer.MAX_VALUE` length. (cherry picked from commit a53fb85)
Replaces creating the state manually in the `VariableBehaviorTest` and reuses the extension instead. (cherry picked from commit 829b592)
Adds size probing capabilities to the `TypedEventWriter`, namely one `#canWriteEventOfLength(int)` which checks if an additional event of the given length could be written. This simply delgates to the batch writer under the hood the normal case, with some sane overrides for other implementations. Additionally delegates to the writer to report/determine the `maxEventLength` instead of getting it from the `ProcessingContext`. The reasoning for both is that these are writer specific properties: it's the writer's responsibility to know what it can write, and whether it can write it or not. (cherry picked from commit 3d8af7b)
Extracts collecting activatable jobs for a job batch activation request into a specific class. This allows more narrowed, simpler testing of the behavior. Additionally, the behavior makes use of the new `TypedEventWriter#canWriteEventOfLength(int)` API. (cherry picked from commit 0c1985f)
Renames record type `LargeJob` to `TooLargeJob` to better reflect the fact that it is excessively large. (cherry picked from commit fe996c2)
10 tasks
0dd5c4c
to
2f6fa8a
Compare
2f6fa8a
to
39f2ef7
Compare
bors merge |
👎 Rejected by too few approved reviews |
npepinpe
approved these changes
Feb 23, 2022
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.
bors merge
This pull request was closed.
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.
Description
Backport of #8799 to
stable/1.3
.relates to #8797 #5525