buptljy commented on issue #10207: [FLINK-14766] Remove volatile variable in ExecutionVertex URL: https://github.com/apache/flink/pull/10207#issuecomment-555439539 > @buptljy if these variable are guarded by locks so that we don't need to marking them as `volatile`, I think it is necessary to add `@GuardedBy` annotation to point out which lock protects it; otherwise we risk in losing synchronization strategy here. Thanks for your review! I think `assertRunningInJobMasterMainThread()` has already been able to help us make sure these operations are single-threaded(though it's not called for every method). And after reading some docs about `GuardedBy`, here may not be a good use case for `GuardedBy` because others may doubt there's a lock around when they see the annotation (maybe I understand wrongly?).
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
