Memory leaks in RocksDBDAO after rocksdbjni upgraded to 7
- Dominant language
- Java
- Stars
- 6.2k
- Forks
- 2.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 111
Description
As stated in the following links
[Native memory leak through JNI after upgrading to 7.0.4|https://github.com/facebook/rocksdb/issues/9962]
[AbstractNativeReference.java|https://github.com/facebook/rocksdb/blob/v7.5.3/java/src/main/java/org/rocksdb/AbstractNativeReference.java]
After removed finalize() in RocksDB 7,it is required that users call {{close}} on RocksJava objects or use {{try-with-resource.}}
I found several rocksdb objects in RocksDBDAO that were not released properly, such as {{DBOptions}},{{ColumnFamilyOptions}},{{WriteOptions}} and {{RocksIterator}}.
## JIRA info
- Link: https://issues.apache.org/jira/browse/HUDI-7519
- Type: Bug
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating RocksDBDAO and reviewing how its DBOptions, ColumnFamilyOptions, WriteOptions, and RocksIterator objects are created and released. Read the linked RocksDB 7 AbstractNativeReference guidance and issue 9962 first. Done means every listed native resource has an appropriate close lifecycle and the memory leak no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100