-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-23120][python] Fix ByteArrayWrapperSerializer.serialize to use writeInt to serialize the length #16258
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
Conversation
… writeInt to serialize the length
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 5863668 (Thu Sep 23 17:51:56 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
| @Override | ||
| protected ByteArrayWrapper[] getTestData() { | ||
| return new ByteArrayWrapper[] { | ||
| randomByteArray(), |
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.
I think it is better to have the critical cases as dedicated data. The test should include at least one empty array, one short length, one long length (> 256 bytes) and one very long (> 64k). Random arrays can be added, but the important ones should always be in there.
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.
It makes sense to add dedicated data test. Regarding to 64k length, it fails with OutOfMemoryError 1 times every two runs in my desktop and so I change it to 32k (succeed running the test case 10 times) for test stability.
|
@StephanEwen Thanks a lot for the review. Have updated the PR for the test cases. |
|
@flinkbot run azure |
|
@StephanEwen @HuangXingBo Thanks a lot for the review. I'm merging this PR to catch up with the bugfix release of 1.13 as this is a series bug for MapState in Python DataStream API. Feel free to let me know if there is anything we could improve. |
… writeInt to serialize the length This closes #16258.
… writeInt to serialize the length This closes #16258.
What is the purpose of the change
This pull request fixes ByteArrayWrapperSerializer
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation