[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17336677#comment-17336677 ] Flink Jira Bot commented on FLINK-8297: --- This issue was labeled "stale-major" 7 ago and has not received any updates so it is being deprioritized. If this ticket is actually Major, please raise the priority and ask a committer to assign you the issue or revive the public discussion. > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Runtime / State Backends >Affects Versions: 1.3.2, 1.4.0 >Reporter: Jan Lukavský >Priority: Major > Labels: pull-request-available, stale-major > Time Spent: 20m > Remaining Estimate: 0h > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17328685#comment-17328685 ] Flink Jira Bot commented on FLINK-8297: --- This major issue is unassigned and itself and all of its Sub-Tasks have not been updated for 30 days. So, it has been labeled "stale-major". If this ticket is indeed "major", please either assign yourself or give an update. Afterwards, please remove the label. In 7 days the issue will be deprioritized. > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Runtime / State Backends >Affects Versions: 1.3.2, 1.4.0 >Reporter: Jan Lukavský >Priority: Major > Labels: pull-request-available, stale-major > Time Spent: 20m > Remaining Estimate: 0h > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16461186#comment-16461186 ] ASF GitHub Bot commented on FLINK-8297: --- Github user je-ik commented on the issue: https://github.com/apache/flink/pull/5185 @StefanRRichter I think that was exactly the initial idea, but then we came into troubles with the savepoints and changing list type. Also as @aljoscha mentioned, it can be confusing for users to see `MapState` instead of `ListState` after inspecting the savepoint. Unfortunately, I currently don't have time to work on this, so if anyone would be interested in getting this done, that would be awesome. > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16461160#comment-16461160 ] ASF GitHub Bot commented on FLINK-8297: --- Github user StefanRRichter commented on the issue: https://github.com/apache/flink/pull/5185 Just a thought, how about having all this implemented on top of a map state, and also include the current size as a special entry in the map (with the size field having a key that makes it lexicographically the first entry, so that the iteration can easily skip it). Then we could have a util that wraps a map state into a list state. So the user can register a map state and enhance it to operate as a list state. From Flink's perspective it is still a map state in savepoints and only the user code reinterprets it as list state. Obviously this does not solve the problem of migrating between different list types, but it also does need to introduce a second list type and keeps the window operator as is. > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16400570#comment-16400570 ] Jan Lukavský commented on FLINK-8297: - Yes, that seems related. I'm not 100% convinced that simply overcoming size limitation of `Integer.MAX_VALUE` solves the actual problem, because the whole list would have to still be stored in memory and can therefore result in various OOM errors, or containers being killed (e.g. on YARN). > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16400215#comment-16400215 ] Truong Duc Kien commented on FLINK-8297: Isn't this also related to https://issues.apache.org/jira/browse/FLINK-6761 > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16392976#comment-16392976 ] ASF GitHub Bot commented on FLINK-8297: --- Github user je-ik commented on the issue: https://github.com/apache/flink/pull/5185 @StephanEwen I think it should be configurable. As Aljoscha pointed out, it is needed to ensure that these two representations have the same serialized form in checkpoints, because that way users can switch back and forth the implementations between application restarts. Unfortunately, I didn't have time to dive into that so far. :-( > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16392957#comment-16392957 ] ASF GitHub Bot commented on FLINK-8297: --- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/5185 Is the general thought to always have list state as a map, or only fallback to that way if the lists cross a certain threshold? Since list state backs many common operations (non aggregating windows) we have to be super careful with the performance implications of this. > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16364145#comment-16364145 ] ASF GitHub Bot commented on FLINK-8297: --- Github user aljoscha commented on the issue: https://github.com/apache/flink/pull/5185 It doesn't have to be the same while were working on it in RocksDB but when checkpointing it should be written in the same format. This might be trickier than it sounds, btw, but I don't think we can have different savepoint formats for such a feature. > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16364082#comment-16364082 ] ASF GitHub Bot commented on FLINK-8297: --- Github user je-ik commented on the issue: https://github.com/apache/flink/pull/5185 @aljoscha I updated the title. I'm a little concerned about the serialization in savepoint. If the serialization is *exactly* the same, doesn't that actually mean that again, the whole List will be stored in single byte[], which will OOME for cases which the user wanted to solve by activating the "large list" implementation? Or am I missing something? > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16364078#comment-16364078 ] ASF GitHub Bot commented on FLINK-8297: --- Github user aljoscha commented on the issue: https://github.com/apache/flink/pull/5185 Thanks for the update. Regarding migration, I think the format that we write to the savepoint must be the same between the two `ListState` implementations. @StefanRRichter could you please have a look at this? And also @StephanEwen, I think you did a similar PoC implementation of this a while back. @je-ik It would make sense to change the title of the PR to reflect what this does now better. > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16360123#comment-16360123 ] ASF GitHub Bot commented on FLINK-8297: --- Github user je-ik commented on the issue: https://github.com/apache/flink/pull/5185 @aljoscha I (partly) reworked this PR as you suggest. There are still some unresolved questions though: 1) I'm not 100% sure how to cleanly support the migration between list state savepoints, would you have any pointers on how should I address this? 2) I didn't test the new version on actual flink job yet, it just passes tests I think there will be some more modifications needed, so I will test this on real data when there is agreement on the actual implementation. Thanks in advance for any comments! > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský >Priority: Major > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16308081#comment-16308081 ] ASF GitHub Bot commented on FLINK-8297: --- Github user aljoscha commented on the issue: https://github.com/apache/flink/pull/5185 The concept of this looks good. However, if we want to merge it I think we have to make this a standalone thing and not depend on other states because this can have unforeseen consequences for future developments. I can think of several cases where the current approach would lead to surprising problems: - a user inspects a savepoint and finds a `MapState` and a `ValueState` instead of the `ListState` they're expecting (becomes a problem when we have tools for inspecting savepoints and also is problematic for compatibility of the savepoint format between different state backends) - (related to the above) the "binary format" of the savepoint is different between the two list implementations. This leads to problems if you want to change the implementation between restoring from a savepoint and when you want to switch backends (which we currently don't support). - if/when we have metrics for user states this would export metrics for a `MapState` and a `ValueState` and not for one expected `ListState` > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16299719#comment-16299719 ] ASF GitHub Bot commented on FLINK-8297: --- Github user je-ik commented on the issue: https://github.com/apache/flink/pull/5185 I think that the failed test is not related to this PR. > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16298961#comment-16298961 ] ASF GitHub Bot commented on FLINK-8297: --- Github user bowenli86 commented on the issue: https://github.com/apache/flink/pull/5185 This might be a great chance to start discussing how ListState APIs should evolve - specifically, is it time to consider adding `remove()` to ListState? > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (FLINK-8297) RocksDBListState stores whole list in single byte[]
[ https://issues.apache.org/jira/browse/FLINK-8297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16297476#comment-16297476 ] ASF GitHub Bot commented on FLINK-8297: --- GitHub user je-ik opened a pull request: https://github.com/apache/flink/pull/5185 [FLINK-8297] [flink-rocksdb] optionally use RocksDBMapState internally for storing lists ## What is the purpose of the change Enable storing lists not fitting to memory per single key. ## Brief change log ## Verifying this change This change added tests and can be verified as follows: passes additional tests for RocksDBStateBackend.enableLargeListsPerKey() ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: yes - The serializers: no - The runtime per-record code paths (performance sensitive): no, backward compatible - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? yes - If yes, how is the feature documented? JavaDocs You can merge this pull request into a Git repository by running: $ git pull https://github.com/datadrivencz/flink rocksdb-backend-memory-optimization Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/5185.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #5185 commit f1bbaa30901ba8a54b02908fd3eb3615301b4400 Author: Jan LukavskyDate: 2017-12-14T20:42:06Z [FLINK-8297] [flink-rocksdb] optionally use RocksDBMapState internally for storing lists > RocksDBListState stores whole list in single byte[] > --- > > Key: FLINK-8297 > URL: https://issues.apache.org/jira/browse/FLINK-8297 > Project: Flink > Issue Type: Improvement > Components: Core >Affects Versions: 1.4.0, 1.3.2 >Reporter: Jan Lukavský > > RocksDBListState currently keeps whole list of data in single RocksDB > key-value pair, which implies that the list actually must fit into memory. > Larger lists are not supported and end up with OOME or other error. The > RocksDBListState could be modified so that individual items in list are > stored in separate keys in RocksDB and can then be iterated over. A simple > implementation could reuse existing RocksDBMapState, with key as index to the > list and a single RocksDBValueState keeping track of how many items has > already been added to the list. Because this implementation might be less > efficient in come cases, it would be good to make it opt-in by a construct > like > {{new RocksDBStateBackend().enableLargeListsPerKey()}} -- This message was sent by Atlassian JIRA (v6.4.14#64029)