akalash commented on a change in pull request #17946:
URL: https://github.com/apache/flink/pull/17946#discussion_r758317576
##########
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:
In fact, I think we should check nullability of `statsTracker` under the
lock as well since that variable is not volatile. But as I can see we already
have a place where we don't do that `trackPendingCheckpointStats` so I suppose
we have some happens-before protection here. but if it is not true we should
fix both places.
--
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]