WriteBatch objects leak off-heap memory
Should be cherry-picked back to 2.3 (picked from 2.2 to 2.1 in 7077 )
Reviewers: pkleindl Matthias J. Sax Bill Bejeck Guozhang Wang
@@ -233,6 +233,7 @@ public class AbstractRocksDBSegmentedBytesStore<S extends Segment> implements Se
final S segment = entry.getKey();
final WriteBatch batch = entry.getValue();
segment.write(batch);
+ batch.close();
}
} catch (final RocksDBException e) {
throw new ProcessorStateException("Error restoring batch to store " + this.name, e);
