dawidwys commented on a change in pull request #17946:
URL: https://github.com/apache/flink/pull/17946#discussion_r759140071
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -1882,9 +1882,11 @@ int getNumQueuedRequests() {
public void reportStats(long id, ExecutionAttemptID attemptId,
CheckpointMetrics metrics)
throws CheckpointException {
if (statsTracker != null) {
- attemptMappingProvider
- .getVertex(attemptId)
- .ifPresent(ev -> statsTracker.reportIncompleteStats(id,
ev, metrics));
+ synchronized (lock) {
Review comment:
If I understand the code correctly the `statsTracker` is set when
creating the `CheckpointCoordinator`. Tbh, I believe it should be passed in the
ctor and honestly it might never be null. It might've been nullable in the
past.
WDYT about passing the `statsTracker` in the ctor, removing the setter and
making it non null? See
`org.apache.flink.runtime.executiongraph.DefaultExecutionGraph#enableCheckpointing`.
It is the only place we're constructing the `CheckpointCoordinator` and the
`statsTracker` can not be null there (line 408).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]