Open neilramaswamy opened 3 months ago
Update: I have bisected the issue to https://github.com/facebook/rocksdb/pull/11770/. I've looked through the PR and don't see anything obviously wrong that could be the root cause. (One thing I noticed was that this line does an exception check on the env
, even though in that case we should check if it's a nullptr
. But that's not the issue, since locally, that doesn't fix the error.)
Hello @neilramaswamy,
I think you really found bug and you are right with the PR which cause this bug. It looks like JNI code for SstFileMetaData
wasn't updated during this PR. Let me fix it.
Radek
Hi @rhubner, were you planning on opening a PR? If not, I can investigate whether the fix you proposed actually works (I haven't actually checked), and I can create one.
Hi @rhubner, were you planning on opening a PR? If not, I can investigate whether the fix you proposed actually works (I haven't actually checked), and I can create one.
Hello @neilramaswamy,
I just submitted PR #12474 which should fix this issue. It will be great if you can test it and let me know the results.
Radek
Expected behavior
After writing some data to a database, calling
getColumnFamilyMetaData
twice should not throw an exception in either case.Actual behavior
After writing some data to a database, the second call to
getColumnFamilyMetaData
throws the following JNI exception:Steps to reproduce the behavior
This consistently repro's with both JDK 8 and 17. I bisected the test, and it only appeared in 8.11.3, and persists in 9.0.0. However, 8.10.2 does not have this issue. Here is the most minimal repro I could create:
Interestingly, this issue does not appear if you have an empty database. Excluding the call to
put("foo", "bar")
on a clean directory will prevent this error from happening. Also, running the test without theput
call (but with a database that has data in it) will also fail.Thanks!