becketqin commented on issue #8331: [FLINK-11987][flink-connector-kafka-0.11] convert NEXT_TRANSACTIONAL_ID_HINT_DESCRIPTOR to a non-static variabl… URL: https://github.com/apache/flink/pull/8331#issuecomment-497186051 > Thanks for the analysis @becketqin , and I also agree that we'd better fix the issue from inside `StateDescriptor`. > > Regarding the options, besides the already proposed two, there's a 3rd option: making `StateDescriptor.serializer` singleton with CAS plus removing the nulls out of `StateDescriptor.typeInfo` to prevent NPE caused by race condition, as suggested by @StephanEwen in JIRA. IMHO this is a more light-weight and quick fix for the time being. Wdyt? Thanks. @carp84 Yes, CAS + not nullify works. It is essentially one way to synchronize on the fields. On the other hand, given that performance is probably not a concern here, personally I feel adding a `synchronized` block seems less work and more readable.
---------------------------------------------------------------- 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
