You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by StefanRRichter <gi...@git.apache.org> on 2018/05/02 10:06:04 UTC

[GitHub] flink issue #5934: [FLINK-9269][state] fix concurrency problem when performi...

Github user StefanRRichter commented on the issue:

    https://github.com/apache/flink/pull/5934
  
    Yes, there is a theoretical problem if the serialization would not be threadsafe. I think currently the silent assumption that holds is that serializers are immutable w.r.t. serialization after they have been created and passed to create a state. I think Stephan's suggestion would be the right approach to materialize that assumption into code and also gain a bit of efficiency.
    I think the other concurrency problem is a problem that comes from lazy state registration, and I assume most jobs use de-facto eager state registration, so all the state is registered in `open()` or `initializeState(...)`, and they are never changed at runtime. For the few remaining jobs, there must also be a certain timing that they need to register a new state while a checkpoint is running. Overall, I think those are the reasons why there is no reported case of a problem from this in practice. But I agree this should be addressed and is also very easy to fix.


---