carp84 commented on issue #9501: [FLINK-12697] [State Backends] Support on-disk state storage for spill-able heap backend URL: https://github.com/apache/flink/pull/9501#issuecomment-538676755 > Why would this be the case? The only accessing threads should be the Task's main thread and the asynchronous checkpointing, right? Couldn't we say that the asynchronous checkpointing creates one single instance and reuses this instance for the whole checkpointing procedure? One could make it even a thread local variable if one wants to have an easy solution. So I'm not sure where the argument comes from that using a thin wrapping object around a pointer will necessarily decrease performance. When talking about wrapping a `Node` object and reuse it in every node manipulation, it's no more single thread accessed, because there might be multiple checkpoints ongoing in parallel. Considering we're using the copy-on-write mechanism, there might be multiple versions (or say a value chain) for a single key, which will make reusing a wrapper really tricky. I'm afraid it will not only increase the complexity of implementation but also even worsen readability, on the contrary to the intuition. As we all know, the killer is not the 99% cases, but the 1% corner case (smile).
---------------------------------------------------------------- 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