facebook / facebook/rocksdb

JNI ColumnFamilyHandle#getDescriptor method leaks memory

Open
#12,224 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

### Expected behavior
Calling `ColumnFamilyHandle#getDescriptor()` should produce either a `ColumnFamilyDescriptor` that can be `close()`d to free the native memory backing it, or no native allocation should occur.

### Actual behavior
Calling `ColumnFamilyHandle#getDescriptor()` allocates a native `rocksdb::db::ColumnFamilyDescriptor`, copying the name and options from the handle. Since the Java `ColumnFamilyDescriptor` is not a `RocksObject`, this memory cannot be tracked/freed from Java.

### Steps to reproduce the behavior
Call `ColumnFamilyHandle#getDescriptor()` repeatedly from Java and monitor memory usage.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.