rocksdb-native 3.2.0 → 3.3.0

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/CMakeLists.txt CHANGED
@@ -13,7 +13,7 @@ if(target MATCHES "win32")
13
13
  add_compile_options(/MT$<$<CONFIG:Debug>:d>)
14
14
  endif()
15
15
 
16
- fetch_package("github:holepunchto/librocksdb#da2deb5")
16
+ fetch_package("github:holepunchto/librocksdb#2b388ab")
17
17
 
18
18
  add_bare_module(rocksdb_native_bare)
19
19
 
package/binding.c CHANGED
@@ -28,6 +28,8 @@ typedef struct {
28
28
  rocksdb_native_uint64_t table_block_size;
29
29
  uint32_t table_cache_index_and_filter_blocks;
30
30
  uint32_t table_format_version;
31
+ uint32_t optimize_filters_for_memory;
32
+ uint32_t no_block_cache;
31
33
  } rocksdb_native_column_family_options_t;
32
34
 
33
35
  typedef struct {
@@ -312,6 +314,7 @@ rocksdb_native__on_teardown(js_deferred_teardown_t *handle, void *data) {
312
314
 
313
315
  rocksdb_native_close_t *req = malloc(sizeof(rocksdb_native_close_t));
314
316
 
317
+ req->env = env;
315
318
  req->handle.data = (void *) req;
316
319
 
317
320
  err = rocksdb_close(&db->handle, &req->handle, rocksdb_native__on_close);
@@ -718,7 +721,7 @@ rocksdb_native_column_family_init(js_env_t *env, js_callback_info_t *info) {
718
721
  column_family->descriptor = (rocksdb_column_family_descriptor_t) {
719
722
  (const char *) name,
720
723
  {
721
- 0,
724
+ 1,
722
725
  options->compation_style,
723
726
  options->enable_blob_files,
724
727
  rocksdb_native__to_uint64(options->min_blob_size),
@@ -727,6 +730,8 @@ rocksdb_native_column_family_init(js_env_t *env, js_callback_info_t *info) {
727
730
  rocksdb_native__to_uint64(options->table_block_size),
728
731
  options->table_cache_index_and_filter_blocks,
729
732
  options->table_format_version,
733
+ options->optimize_filters_for_memory,
734
+ options->no_block_cache,
730
735
  }
731
736
  };
732
737
 
@@ -12,6 +12,8 @@ class RocksDBColumnFamily {
12
12
  tableBlockSize = 8192,
13
13
  tableCacheIndexAndFilterBlocks = true,
14
14
  tableFormatVersion = 6,
15
+ optimizeFiltersForMemory = false,
16
+ blockCache = true,
15
17
  // In case we are cloning
16
18
  settings = null
17
19
  } = opts
@@ -30,7 +32,9 @@ class RocksDBColumnFamily {
30
32
  tableBlockSize & 0xffffffff,
31
33
  Math.floor(tableBlockSize / 0x100000000),
32
34
  tableCacheIndexAndFilterBlocks ? 1 : 0,
33
- tableFormatVersion
35
+ tableFormatVersion,
36
+ optimizeFiltersForMemory ? 1 : 0,
37
+ blockCache ? 0 : 1
34
38
  ])
35
39
 
36
40
  this._handle = binding.columnFamilyInit(name, this._settings)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rocksdb-native",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "librocksdb bindings for JavaScript",
5
5
  "exports": {
6
6
  ".": "./index.js",