carp84 commented on issue #8570: [FLINK-12688] [state] Make serializer lazy initialization thread safe in StateDescriptor URL: https://github.com/apache/flink/pull/8570#issuecomment-497619270 > One slight clarification regarding a comment that was mentioned in the description: > > ``` > The change here assures only one single serializer instance will be returned by StateDescriptor.getSerializer after lazy initialization while previously no such assurance. > ``` > > If I understood this correctly, this should be incorrect. `getSerializer` always creates a duplicate of the wrapped serializer. This is required since `TypeSerializer` isn't thread-safe. > So, with this change, the returned serializer is still always a duplicate, but the one maintained within `StateDescriptor` is a singleton. > > @carp84 can you confirm this? Correct, I meant the original serializer will be a singleton. Let me update the description.
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services