Github user shixiaogang commented on a diff in the pull request: https://github.com/apache/flink/pull/3336#discussion_r102225285 --- Diff: flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java --- @@ -382,11 +342,26 @@ private UV deserializeUserValue(byte[] rawValueBytes) { this.rawValueBytes = rawValueBytes; this.deleted = false; } - + + public void remove() { + deleted = true; + rawValueBytes = null; + + try { + db.remove(columnFamily, writeOptions, rawKeyBytes); + } catch (RocksDBException e) { + throw new RuntimeException("Error while removing data from RocksDB.", e); --- End diff -- I modify the method signature because I find, except `ValueState`, the methods in other states all throw `Exception`. I think it's okay because `MapState` is a common interface which has no idea of the implementation. The implementation of these methods, however, should throw some specific exception like `IOException` or `RocksDBException`. I think it's reasonable. What do you think?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---