[FLINK-34643] Fix concurrency issue in LoggerAuditingExtension#24550
[FLINK-34643] Fix concurrency issue in LoggerAuditingExtension#24550rkhachatryan merged 2 commits intoapache:masterfrom
Conversation
|
Can you elaborate a bit why this would solve the issue? Isn't |
|
Sure, my theory is that although the order is correct, the write to this field ( The fix is to use |
RyanSkraba
left a comment
There was a problem hiding this comment.
LGTM
I had to refresh my understanding of the volatile keyword :D, but it seems to me that this is correct. After this change, any assignment or reassignment to loggingEvent (1) will be immediately visible to other threads and (2) guarantees that any other thread that has read (to assign to loggingEventsLocal) will have occurred before.
Thanks!
|
Thanks for reviewing! Merging |
What is the purpose of the change
(For example: This pull request makes task deployment go through the blob server, rather than through RPC. That way we avoid re-transferring them on each deployment (during recovery).)
Brief change log
(for example:)
Verifying this change
Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation