Github user bowenli86 commented on a diff in the pull request: https://github.com/apache/flink/pull/5979#discussion_r187255609 --- Diff: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java --- @@ -356,6 +369,20 @@ private UV deserializeUserValue(byte[] rawValueBytes, TypeSerializer<UV> valueSe return isNull ? null : valueSerializer.deserialize(in); } + private boolean startWithKeyPrefix(byte[] keyPrefixBytes, byte[] rawKeyBytes) { + if (rawKeyBytes.length < keyPrefixBytes.length) { + return false; + } + + for (int i = keyPrefixBytes.length; --i >= backend.getKeyGroupPrefixBytes(); ) { --- End diff -- I recommend moving `--i` to the increment part of the `for` loop, instead of keeping it in the termination part
---