@nxtedition/rocksdb 5.2.39 → 5.2.40
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
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
#include <optional>
|
|
19
19
|
#include <set>
|
|
20
20
|
#include <string>
|
|
21
|
-
#include <vector>
|
|
22
21
|
#include <thread>
|
|
22
|
+
#include <vector>
|
|
23
23
|
|
|
24
24
|
class NullLogger : public rocksdb::Logger {
|
|
25
25
|
public:
|
|
@@ -602,7 +602,8 @@ NAPI_METHOD(db_open) {
|
|
|
602
602
|
: rocksdb::kNoCompression;
|
|
603
603
|
options.use_adaptive_mutex = true;
|
|
604
604
|
options.enable_pipelined_write = true;
|
|
605
|
-
options.max_background_jobs =
|
|
605
|
+
options.max_background_jobs =
|
|
606
|
+
Uint32Property(env, argv[2], "maxBackgroundJobs").value_or(std::thread::hardware_concurrency() / 4);
|
|
606
607
|
|
|
607
608
|
// TODO: Consider direct IO (https://github.com/facebook/rocksdb/wiki/Direct-IO) once
|
|
608
609
|
// secondary compressed cache is stable.
|
|
@@ -641,7 +642,8 @@ NAPI_METHOD(db_open) {
|
|
|
641
642
|
|
|
642
643
|
if (cacheSize) {
|
|
643
644
|
tableOptions.block_cache = rocksdb::NewLRUCache(cacheSize);
|
|
644
|
-
tableOptions.cache_index_and_filter_blocks =
|
|
645
|
+
tableOptions.cache_index_and_filter_blocks =
|
|
646
|
+
BooleanProperty(env, argv[2], "cacheIndexAndFilterBlocks").value_or(true);
|
|
645
647
|
} else {
|
|
646
648
|
tableOptions.no_block_cache = true;
|
|
647
649
|
tableOptions.cache_index_and_filter_blocks = false;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|