rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

RocksJava API - fix Transaction.multiGet() size limit, remove bogus EnsureLocalCapacity() calls

Open alanpaxton opened this issue 2 years ago • 0 comments

Resolves @see https://github.com/facebook/rocksdb/issues/9006

Fixes 2 related issues with JNI local references in the RocksJava API.

  1. 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.

  2. The helper for Transaction multiGet operations (multiGet(), multiGetForUpdate(),...) is limited in the number of keys it can get() 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.

alanpaxton avatar Sep 14 '22 11:09 alanpaxton