-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-27162][runtime] Trigger non-periodic checkpoint in 'timer' thread #19864
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
import java.util.concurrent.ThreadLocalRandom; | ||
import java.util.concurrent.TimeUnit; | ||
import java.util.concurrent.atomic.AtomicBoolean; | ||
import java.util.concurrent.locks.LockSupport; |
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.
Hi @akalash , thanks for your contribution. Could you run 'mvn spotless:apply' to remove these useless code?
I think we can rethink |
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.
LGTM, thanks for the update.
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 fix @akalash, in general it LGTM.
I've left a couple of comments regarding the interface though, PTAL.
...ntime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StateWithExecutionGraph.java
Outdated
Show resolved
Hide resolved
public CompletableFuture<CompletedCheckpoint> triggerCheckpointFromCheckpointThread( | ||
boolean isPeriodic) { |
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 this method should not accept boolean isPeriodic
:
If periodic triggering is enabled via startCheckpointScheduler()
, I couldn't imagine a use case for that - and there is no callers using true
.
If it's disabled with stopCheckpointScheduler()
then it doesn't make sense to call this method at all.
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.
The same point about tests. But perhaps, I can migrate these tests to another method
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 see your point, there are a lot of existing usages of triggerCheckpoint(false)
in tests, so please feel free to leave it as is.
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 @akalash
LGTM
Please squash the commits and rebase, I suppose the failure is caused by FLINK-28269.
Hi @akalash , could you rebase master and push again? |
@flinkbot run azure |
What is the purpose of the change
Checkpoint trigger always from one thread
Brief change log
Verifying this change
No extra tests
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation