flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject [2/7] flink git commit: [FLINK-7700] Fix RocksDB ListState merging
Date Mon, 02 Oct 2017 08:19:37 GMT
[FLINK-7700] Fix RocksDB ListState merging

Before, the merged state was not cleared.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/31cd6db6
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/31cd6db6
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/31cd6db6

Branch: refs/heads/release-1.3
Commit: 31cd6db6a7d2f7d78aa05f6ff5fc82abbc79d042
Parents: 64858a7
Author: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Authored: Wed Sep 27 11:37:09 2017 +0200
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Thu Sep 28 17:26:11 2017 +0200

----------------------------------------------------------------------
 .../org/apache/flink/contrib/streaming/state/RocksDBListState.java  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/31cd6db6/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBListState.java
----------------------------------------------------------------------
diff --git a/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBListState.java
b/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBListState.java
index a8b20d1..486fa62 100644
--- a/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBListState.java
+++ b/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBListState.java
@@ -146,6 +146,7 @@ public class RocksDBListState<K, N, V>
 
 					byte[] sourceKey = keySerializationStream.toByteArray();
 					byte[] valueBytes = backend.db.get(columnFamily, sourceKey);
+					backend.db.remove(columnFamily, sourceKey);
 
 					if (valueBytes != null) {
 						backend.db.merge(columnFamily, writeOptions, targetKey, valueBytes);


Mime
View raw message