Repository: flink Updated Branches: refs/heads/master 33abc25f0 -> 5e6ffbc19
[FLINK-6104] Fix resource leak in ListViaRangeSpeedMiniBenchmark This closes #3725. Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/5e6ffbc1 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/5e6ffbc1 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/5e6ffbc1 Branch: refs/heads/master Commit: 5e6ffbc19e83529bb6e3c39d4a0b5ab322aa4633 Parents: 33abc25 Author: zhangminglei <zml13856086...@163.com> Authored: Sun Apr 16 20:10:21 2017 +0800 Committer: zentol <ches...@apache.org> Committed: Tue Apr 18 13:46:03 2017 +0200 ---------------------------------------------------------------------- .../state/benchmark/ListViaRangeSpeedMiniBenchmark.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/5e6ffbc1/flink-contrib/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/benchmark/ListViaRangeSpeedMiniBenchmark.java ---------------------------------------------------------------------- diff --git a/flink-contrib/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/benchmark/ListViaRangeSpeedMiniBenchmark.java b/flink-contrib/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/benchmark/ListViaRangeSpeedMiniBenchmark.java index 793a35b..b427ef1 100644 --- a/flink-contrib/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/benchmark/ListViaRangeSpeedMiniBenchmark.java +++ b/flink-contrib/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/benchmark/ListViaRangeSpeedMiniBenchmark.java @@ -107,6 +107,10 @@ public class ListViaRangeSpeedMiniBenchmark { final long endGet = System.nanoTime(); System.out.println("end get - duration: " + ((endGet - beginGet) / 1_000_000) + " ms"); + + // WriteOptions and RocksDB ultimately extends AbstractNativeReference, so we need to close resource as well. + write_options.close(); + rocksDB.close(); } private static boolean samePrefix(byte[] prefix, byte[] key) {