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/06/16 16:46:45 UTC

[GitHub] flink issue #6174: [FLINK-9601][state]Try to reuse the snapshotData array as...

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?


---