rocksdb
rocksdb copied to clipboard
RocksJava API - fix Transaction.multiGet() size limit, remove bogus EnsureLocalCapacity() calls
Resolves @see https://github.com/facebook/rocksdb/issues/9006
Fixes 2 related issues with JNI local references in the RocksJava API.
-
Some instances of RocksJava API JNI code appear to have misunderstood the reason for
JNIEnv->EnsureLocalCapacity()
and are carrying out bogus checks which happen to fail with some larger parameter values (many column families in a single call, very long key names or values). Remove these checks and add some regression tests for the previous failures. -
The helper for Transaction multiGet operations (
multiGet()
,multiGetForUpdate()
,...) is limited in the number of keys it canget()
for because it requires a corresponding number of live local references. Refactor the helper slightly, copying out the key contents within a loop so that the references don't have to exist at the same time.