-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-17928][checkpointing] Fix ChannelStateHandle size #12362
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
…tRecordingOffsets 1. Set writer position in NetworkBuffer passed to ChannelStateCheckpointWriter.write 2. Reduce state size to fit in the configured MemoryCheckpointOutputStream
… deserializer Motivation: 1. add a method that deserializes and then serializes data 2. simplify
…o JM Before this commit, if Unaligned checkpoints are enabled, channel state is written as state handles. Each channel has a handle and each such handle references the same underlying streamStateHandle (this is done to have a single file per subtask). But, if the state is less then state.backend.fs.memory-threshold, the data is sent directly to JM as a byteStreamHandle. This causes each channel state handle to hold the whole subtask state. This change solves this by extracting relevant potions of the underlying handles if they are byteStreamHandles.
Store state size explicitly because underlying state handle may be shared.
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 7ec6577 (Wed May 27 14:55:49 UTC 2020) 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. The 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:
|
Can you ping me once azure is green? |
ping @pnowojski ) |
This PR depends on #12292 which should be merged first
What is the purpose of the change
With Unaligned Checkpoints enabled, channel state is written to the file system. If the underlying state handle is shared between multiple handles, they should report their size according to offsets.
Currently, each handle reports the size of the underlying handle, therefore multiplying total state size in reports.
This PR stores state size explicitly in each handle.
Verifying this change
This change added tests and can be verified as follows: added
ChannelStateCheckpointWriterTest.testFileHandleSize
.Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation