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
[FLINK-25557][checkpoint] Introduce incremental/full checkpoint size stats #18324
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 1a403ce (Tue Jan 11 09:20:29 UTC 2022) 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:
|
1a403ce
to
d06095f
Compare
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 PR @Myasuka , I think it's a very valuable addition!
I have some general questions:
- How does this work after up-scaling? Will state size be reported e.g. twice? (if so, I guess it's an existing problem, right?)
- I think documentation needs to be updated (https://nightlies.apache.org/flink/flink-docs-master/docs/ops/monitoring/checkpoint_monitoring/)
- If checkpoint is aborted, full size is reported, but incremental is not (in
AsyncCheckpointRunnable
). I think it's fine, but this should also be documented
I've also left some comments in the code, PTAL.
...time/src/main/java/org/apache/flink/runtime/state/changelog/ChangelogStateBackendHandle.java
Outdated
Show resolved
Hide resolved
...time/src/main/java/org/apache/flink/runtime/state/changelog/ChangelogStateBackendHandle.java
Outdated
Show resolved
Hide resolved
...time/src/main/java/org/apache/flink/runtime/state/changelog/ChangelogStateBackendHandle.java
Outdated
Show resolved
Hide resolved
...-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalRemoteKeyedStateHandle.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/main/java/org/apache/flink/runtime/state/StateObject.java
Outdated
Show resolved
Hide resolved
...end-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java
Outdated
Show resolved
Hide resolved
...end-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java
Outdated
Show resolved
Hide resolved
...web/web-dashboard/src/app/pages/job/checkpoints/detail/job-checkpoints-detail.component.html
Outdated
Show resolved
Hide resolved
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/SubtaskStateStats.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalKeyedStateHandle.java
Outdated
Show resolved
Hide resolved
@rkhachatryan , what do you mean "How does this work after up-scaling? Will state size be reported e.g. twice"? Checkpoint state size would only report during taking checkpoint.
|
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.
Checkpoint state size would only report during taking checkpoint.
Right, and RocksDB doesn't re-use SST currently by more than one task, IIRC. So for the next checkpoint no two tasks will report the same file usage.
It's different for changelog though as it can re-use files on up-scaling.
The only solution I see is to deduplicate files on JM (which will also help reporting the number of created files).
Could you explain the two options you proposed? (or let's chat offline maybe)
...end-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/SubtaskStateStats.java
Outdated
Show resolved
Hide resolved
...-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalRemoteKeyedStateHandle.java
Outdated
Show resolved
Hide resolved
ee8d8e4
to
b05c9a3
Compare
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 updating the PR.
I've left some comments, PTAL.
My major concern is that for changelog, incremental size may not include most of the state.
...-dstl/flink-dstl-dfs/src/main/java/org/apache/flink/changelog/fs/FsStateChangelogWriter.java
Show resolved
Hide resolved
...-dstl/flink-dstl-dfs/src/main/java/org/apache/flink/changelog/fs/FsStateChangelogWriter.java
Show resolved
Hide resolved
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStats.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/main/java/org/apache/flink/runtime/state/CompositeStateHandle.java
Outdated
Show resolved
Hide resolved
...web/web-dashboard/src/app/pages/job/checkpoints/detail/job-checkpoints-detail.component.html
Show resolved
Hide resolved
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 updating the PR.
I have a suggestion on wording of the tooltip message.
Everything else LGTM.
flink-runtime-web/web-dashboard/src/app/pages/job/checkpoints/job-checkpoints.component.html
Outdated
Show resolved
Hide resolved
flink-runtime-web/web-dashboard/src/app/pages/job/checkpoints/job-checkpoints.component.html
Outdated
Show resolved
Hide resolved
1fc3707
to
0f6b718
Compare
@flinkbot run azure |
What is the purpose of the change
Introduce incremental/full checkpoint size stats.
Brief change log
getIncrementalStateSize
for state objects.PlaceHolderStateHandler
hold state size informationVerifying this change
Added new tests in
StateUtilTest.java
andIncrementalRemoteKeyedStateHandleTest.java
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: yesDocumentation