Skip to content

Release TransactionDB path string after multi-CF open - #14976

Open
verma-divyanshu-git wants to merge 1 commit into
facebook:mainfrom
verma-divyanshu-git:fix-transactiondb-path-string-leak
Open

Release TransactionDB path string after multi-CF open#14976
verma-divyanshu-git wants to merge 1 commit into
facebook:mainfrom
verma-divyanshu-git:fix-transactiondb-path-string-leak

Conversation

@verma-divyanshu-git

Copy link
Copy Markdown

Summary

Release the database path returned by GetStringUTFChars after the multi-column-family TransactionDB::Open call.

This matches the resource handling in the single-column-family and OptimisticTransactionDB implementations.

Fixes #14893

Test plan

  • Built the RocksJava JNI library and Java tests.
  • Ran TransactionDBTest with -Xcheck:jni: 11 tests passed.
  • Ran the complete RocksJava test suite: 1,248 tests passed.
  • Repeated the focused test under macOS leaks and confirmed the original GetStringUTFChars leak stack is no longer present.
  • Ran make check-format and git diff --check.

@meta-cla meta-cla Bot added the CLA Signed label Jul 20, 2026
@verma-divyanshu-git

Copy link
Copy Markdown
Author

@adamretter Would you be able to review this small RocksJava JNI resource-lifetime fix, or point me to the appropriate reviewer?

It follows the existing release pattern in the single-column-family and OptimisticTransactionDB implementations. The CLA and Meta Import Checks are green, while the internal Import Status is still queued. The focused leak verification and full RocksJava test results are included in the PR description.

@K-ANOY, this addresses the leak reported in #14893; any verification would be appreciated.

@K-ANOY

K-ANOY commented Jul 25, 2026

Copy link
Copy Markdown

Looks good to me. This fixes the reported leak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TransactionDB.open (multi-CF overload) never releases the database path UTF chars

2 participants