Github user StefanRRichter commented on a diff in the pull request: https://github.com/apache/flink/pull/3336#discussion_r102187482 --- 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 -- The intention of my comment about `RuntimeException` was not about changing the method signatures for throwing RocksDBExcepion. My suggestion was to only use a proper subclass of `RuntimeException`. We should avoid using `RuntimeException` directly, similar to how we should avoid throwing the class `Exception` directly. I know that there is some code in Flink that does not follow this, but I think it is better code style to stick with more appropriate subclasses.
--- 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. ---