Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Possible resource leak in RocksDBKvBackend.java #1955

Closed
justinmclean opened this issue Feb 2, 2024 · 1 comment · Fixed by #2138
Closed

[Improvement] Possible resource leak in RocksDBKvBackend.java #1955

justinmclean opened this issue Feb 2, 2024 · 1 comment · Fixed by #2138
Assignees
Labels
improvement Improvements on everything

Comments

@justinmclean
Copy link
Member

What would you like to be improved?

In the method scan an exception could mean that db is not closed, same in deleteRange. Local varaible options is not closed in initRocksDB.

How should we improve?

Use try/catch/finally and close options?

@coolderli
Copy link
Contributor

@justinmclean I submit a PR to fix this: #2138
Please help review it when you have time. Thanks.

yuqi1129 pushed a commit that referenced this issue Feb 17, 2024
…#2138)

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[#123] feat(operator): support xxx"
     - "[#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[#255] test: fix flaky test NameOfTheTest"
   Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->

### What changes were proposed in this pull request?

close #1955

### Why are the changes needed?

(Please clarify why the changes are needed. For instance,
  1. If you propose a new API, clarify the use case for a new API.
  2. If you fix a bug, describe the bug.)

Fix: #1955 

### Does this PR introduce _any_ user-facing change?
- no

### How was this patch tested?

- unit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements on everything
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants