Github user StefanRRichter commented on the issue:

    https://github.com/apache/flink/pull/6174
  
    Thanks for the contribution. I think the general idea is good, but I think 
the implementation can be improved. How about changing 
`CopyOnWriteStateTable::snapshotTableArrays()` in such ways that the returned 
snapshot array is already created with a size of 
`max(whateverTheCurrentCodeDoes, size())`. This prevents that we ever have to 
create another array, in particular in this corner case where we are dealing 
with huge arrays. Then the remaining code should automagically work without 
further changes. Adding some nice comment might help that our optimized 
snapshotting algorithm assumes that the array can hold the flattened entries. 
What do you think?


---

Reply via email to