This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 8cefe97  KAFKA-8637: WriteBatch objects leak off-heap memory (#7050)
8cefe97 is described below

commit 8cefe977eb61759baaad644cf1a15020dd3c13ae
Author: A. Sophie Blee-Goldman <sop...@confluent.io>
AuthorDate: Mon Jul 15 16:38:24 2019 -0700

    KAFKA-8637: WriteBatch objects leak off-heap memory (#7050)
    
    Should be cherry-picked back to 2.3 (picked from 2.2 to 2.1 in 7077 )
    
    Reviewers: pkleindl <44436474+pklei...@users.noreply.github.com>, Matthias 
J. Sax <mj...@apache.org>, Bill Bejeck <bbej...@gmail.com>, Guozhang Wang 
<wangg...@gmail.com>
---
 .../streams/state/internals/AbstractRocksDBSegmentedBytesStore.java      | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/streams/src/main/java/org/apache/kafka/streams/state/internals/AbstractRocksDBSegmentedBytesStore.java
 
b/streams/src/main/java/org/apache/kafka/streams/state/internals/AbstractRocksDBSegmentedBytesStore.java
index 22f3a02..ef18d3c 100644
--- 
a/streams/src/main/java/org/apache/kafka/streams/state/internals/AbstractRocksDBSegmentedBytesStore.java
+++ 
b/streams/src/main/java/org/apache/kafka/streams/state/internals/AbstractRocksDBSegmentedBytesStore.java
@@ -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);

Reply via email to