@nxtedition/rocksdb 12.0.6 → 12.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/binding.cc
CHANGED
|
@@ -1020,9 +1020,12 @@ NAPI_METHOD(db_get_many_sync) {
|
|
|
1020
1020
|
int32_t highWaterMarkBytes = std::numeric_limits<int32_t>::max();
|
|
1021
1021
|
NAPI_STATUS_THROWS(GetProperty(env, argv[2], "highWaterMarkBytes", highWaterMarkBytes));
|
|
1022
1022
|
|
|
1023
|
-
std::vector<rocksdb::Slice> keys
|
|
1024
|
-
|
|
1025
|
-
std::vector<rocksdb::
|
|
1023
|
+
std::vector<rocksdb::Slice> keys;
|
|
1024
|
+
keys.resize(count);
|
|
1025
|
+
std::vector<rocksdb::Status> statuses;
|
|
1026
|
+
statuses.resize(count);
|
|
1027
|
+
std::vector<rocksdb::PinnableSlice> values;
|
|
1028
|
+
values.resize(count);
|
|
1026
1029
|
|
|
1027
1030
|
for (uint32_t n = 0; n < count; n++) {
|
|
1028
1031
|
napi_value element;
|
|
@@ -1103,9 +1106,10 @@ NAPI_METHOD(db_get_many) {
|
|
|
1103
1106
|
readOptions.optimize_multiget_for_io = true;
|
|
1104
1107
|
readOptions.value_size_soft_limit = highWaterMarkBytes;
|
|
1105
1108
|
|
|
1106
|
-
std::vector<rocksdb::Slice> keys
|
|
1109
|
+
std::vector<rocksdb::Slice> keys;
|
|
1110
|
+
keys.reserve(count);
|
|
1107
1111
|
for (uint32_t n = 0; n < count; n++) {
|
|
1108
|
-
keys
|
|
1112
|
+
keys.emplace_back(state.keys[n]);
|
|
1109
1113
|
}
|
|
1110
1114
|
|
|
1111
1115
|
state.statuses.resize(count);
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|