You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What the reason for this behavior
All options by default
private byte[] generateString(int size) {
var ba = new byte[size];
new Random().nextBytes(ba);
return ba;
}
var lst = IntStream.range(0, 70_000).mapToObj(i -> generateString(4)).collect(Collectors.toList());
var res= db.multiGetAsList(lst);
Got exception
java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:221)
at java.base/java.util.Arrays$ArrayList.<init>(Arrays.java:4323)
at java.base/java.util.Arrays.asList(Arrays.java:4310)
at org.rocksdb.RocksDB.multiGetAsList(RocksDB.java:2424)
But multigeting list with 60_000 keys is ok.
The text was updated successfully, but these errors were encountered:
Summary:
closesfacebook/rocksdb#8039
Unnecessary use of multiple local JNI references at the same time, 1 per key, was limiting the size of the key array. The local references don't need to be held simultaneously, so if we rearrange the code we can make it work for bigger key arrays.
Incidentally, make errors throw helpful exception messages rather than returning a null pointer.
Pull Request resolved: facebook/rocksdb#9012
Reviewed By: mrambacher
Differential Revision: D31580862
Pulled By: jay-zhuang
fbshipit-source-id: ce05831d52ede332e1b20e74d2dc621d219b9616
rocksdbjni-6-5-12
What the reason for this behavior
All options by default
Got exception
But multigeting list with 60_000 keys is ok.
The text was updated successfully, but these errors were encountered: