From ea6a67af70c6ee811154ab947ce947e1bc0c3a20 Mon Sep 17 00:00:00 2001 From: Guozhang Wang Date: Thu, 26 Oct 2017 13:27:08 -0700 Subject: [PATCH] KAFKA-6100: Down-grade RocksDB to 5.7.3 Author: Guozhang Wang Reviewers: Vahid Hashemian , Damian Guy , Bill Bejeck Closes #4136 from guozhangwang/K6100-rocksdb-580-regression --- gradle/dependencies.gradle | 2 +- .../apache/kafka/streams/state/internals/RocksDBStore.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index f92b16860aa..46ac7ed37fe 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -64,7 +64,7 @@ versions += [ // PowerMock 1.x doesn't support Java 9, so use PowerMock 2.0.0 beta powermock: "2.0.0-beta.5", reflections: "0.9.11", - rocksDB: "5.8.0", + rocksDB: "5.7.3", scalatest: "3.0.4", scoverage: "1.3.1", slf4j: "1.7.25", diff --git a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java index c219314f568..ea01694b09b 100644 --- a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java +++ b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java @@ -269,6 +269,11 @@ public class RocksDBStore implements KeyValueStore { } catch (RocksDBException e) { throw new ProcessorStateException("Error while range compacting during restoring store " + this.name, e); } + + // we need to re-open with the old num.levels again, this is a workaround + // until https://github.com/facebook/rocksdb/pull/2740 is merged in rocksdb + close(); + openDB(internalProcessorContext); } }