@nxtedition/rocksdb 12.0.8 → 12.0.11
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/benchmarks/get-many.mjs +42 -0
- package/binding.cc +16 -2
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/@nxtedition+rocksdb.node +0 -0
- package/prebuilds/linux-x64/@nxtedition+rocksdb.node +0 -0
- package/tmp/000235.sst +0 -0
- package/tmp/000236.sst +0 -0
- package/tmp/000282.sst +0 -0
- package/tmp/000283.sst +0 -0
- package/tmp/000287.sst +0 -0
- package/tmp/000288.sst +0 -0
- package/tmp/000290.sst +0 -0
- package/tmp/000291.sst +0 -0
- package/tmp/000294.sst +0 -0
- package/tmp/000594.log +0 -0
- package/tmp/000597.log +0 -0
- package/tmp/000602.sst +0 -0
- package/tmp/000617.sst +0 -0
- package/tmp/000618.sst +0 -0
- package/tmp/000619.sst +0 -0
- package/tmp/000620.sst +0 -0
- package/tmp/000621.sst +0 -0
- package/tmp/000622.sst +0 -0
- package/tmp/000623.sst +0 -0
- package/tmp/000624.sst +0 -0
- package/tmp/000625.sst +0 -0
- package/tmp/000626.sst +0 -0
- package/tmp/000627.sst +0 -0
- package/tmp/000628.sst +0 -0
- package/tmp/000629.sst +0 -0
- package/tmp/000630.sst +0 -0
- package/tmp/000631.sst +0 -0
- package/tmp/CURRENT +1 -1
- package/tmp/MANIFEST-000546 +0 -0
- package/tmp/{OPTIONS-000007 → OPTIONS-000455} +8 -4
- package/tmp/OPTIONS-000548 +213 -0
- package/util.h +21 -0
- package/tmp/000004.log +0 -0
- package/tmp/MANIFEST-000005 +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { bench, run } from 'mitata'
|
|
2
|
+
import { RocksLevel } from '../index.js'
|
|
3
|
+
|
|
4
|
+
const db = new RocksLevel('./tmp', {
|
|
5
|
+
keyEncoding: 'buffer',
|
|
6
|
+
valueEncoding: 'buffer',
|
|
7
|
+
parallelism: 4,
|
|
8
|
+
pipelinedWrite: false,
|
|
9
|
+
// unorderedWrite: true,
|
|
10
|
+
columns: {
|
|
11
|
+
default: {
|
|
12
|
+
cacheSize: 128e6,
|
|
13
|
+
memtableMemoryBudget: 128e6,
|
|
14
|
+
compaction: 'level'
|
|
15
|
+
// optimize: 'point-lookup',
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
await db.open()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const getOpts = {
|
|
23
|
+
keyEncoding: 'buffer',
|
|
24
|
+
valueEncoding: 'buffer',
|
|
25
|
+
fillCache: true
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
for (let size = 1024 * 8; size <= 256 * 1024; size *= 2) {
|
|
29
|
+
const keys = []
|
|
30
|
+
for (let n = 0; n < 1024; n++) {
|
|
31
|
+
const key = `${n}-${size}`
|
|
32
|
+
keys.push(Buffer.from(key))
|
|
33
|
+
await db.put(key, Buffer.allocUnsafe(size))
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
bench('_getManySync ' + size / 1024, async () => {
|
|
37
|
+
db._getManySync(keys, getOpts).length
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
await run()
|
|
42
|
+
|
package/binding.cc
CHANGED
|
@@ -1021,6 +1021,9 @@ NAPI_METHOD(db_get_many_sync) {
|
|
|
1021
1021
|
int32_t highWaterMarkBytes = std::numeric_limits<int32_t>::max();
|
|
1022
1022
|
NAPI_STATUS_THROWS(GetProperty(env, argv[2], "highWaterMarkBytes", highWaterMarkBytes));
|
|
1023
1023
|
|
|
1024
|
+
bool unsafe = false;
|
|
1025
|
+
NAPI_STATUS_THROWS(GetProperty(env, argv[2], "unsafe", unsafe));
|
|
1026
|
+
|
|
1024
1027
|
std::vector<rocksdb::Slice> keys;
|
|
1025
1028
|
keys.resize(count);
|
|
1026
1029
|
std::vector<rocksdb::Status> statuses;
|
|
@@ -1053,7 +1056,11 @@ NAPI_METHOD(db_get_many_sync) {
|
|
|
1053
1056
|
NAPI_STATUS_THROWS(napi_get_null(env, &row));
|
|
1054
1057
|
} else {
|
|
1055
1058
|
ROCKS_STATUS_THROWS_NAPI(statuses[n]);
|
|
1056
|
-
|
|
1059
|
+
if (unsafe && values[n].size() > 32) {
|
|
1060
|
+
NAPI_STATUS_THROWS(ConvertUnsafe(env, std::move(values[n]), valueEncoding, row));
|
|
1061
|
+
} else {
|
|
1062
|
+
NAPI_STATUS_THROWS(Convert(env, std::move(values[n]), valueEncoding, row));
|
|
1063
|
+
}
|
|
1057
1064
|
}
|
|
1058
1065
|
NAPI_STATUS_THROWS(napi_set_element(env, rows, n, row));
|
|
1059
1066
|
}
|
|
@@ -1082,6 +1089,9 @@ NAPI_METHOD(db_get_many) {
|
|
|
1082
1089
|
int32_t highWaterMarkBytes = std::numeric_limits<int32_t>::max();
|
|
1083
1090
|
NAPI_STATUS_THROWS(GetProperty(env, argv[2], "highWaterMarkBytes", highWaterMarkBytes));
|
|
1084
1091
|
|
|
1092
|
+
bool unsafe = false;
|
|
1093
|
+
NAPI_STATUS_THROWS(GetProperty(env, argv[2], "unsafe", unsafe));
|
|
1094
|
+
|
|
1085
1095
|
auto callback = argv[3];
|
|
1086
1096
|
|
|
1087
1097
|
struct State {
|
|
@@ -1133,7 +1143,11 @@ NAPI_METHOD(db_get_many) {
|
|
|
1133
1143
|
NAPI_STATUS_RETURN(napi_get_null(env, &row));
|
|
1134
1144
|
} else {
|
|
1135
1145
|
ROCKS_STATUS_RETURN_NAPI(state.statuses[n]);
|
|
1136
|
-
|
|
1146
|
+
if (unsafe && state.values[n].size() > 32) {
|
|
1147
|
+
NAPI_STATUS_RETURN(ConvertUnsafe(env, std::move(state.values[n]), valueEncoding, row));
|
|
1148
|
+
} else {
|
|
1149
|
+
NAPI_STATUS_RETURN(Convert(env, std::move(state.values[n]), valueEncoding, row));
|
|
1150
|
+
}
|
|
1137
1151
|
}
|
|
1138
1152
|
NAPI_STATUS_RETURN(napi_set_element(env, argv[1], n, row));
|
|
1139
1153
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
package/tmp/000235.sst
ADDED
|
Binary file
|
package/tmp/000236.sst
ADDED
|
Binary file
|
package/tmp/000282.sst
ADDED
|
Binary file
|
package/tmp/000283.sst
ADDED
|
Binary file
|
package/tmp/000287.sst
ADDED
|
Binary file
|
package/tmp/000288.sst
ADDED
|
Binary file
|
package/tmp/000290.sst
ADDED
|
Binary file
|
package/tmp/000291.sst
ADDED
|
Binary file
|
package/tmp/000294.sst
ADDED
|
Binary file
|
package/tmp/000594.log
ADDED
|
Binary file
|
package/tmp/000597.log
ADDED
|
Binary file
|
package/tmp/000602.sst
ADDED
|
Binary file
|
package/tmp/000617.sst
ADDED
|
Binary file
|
package/tmp/000618.sst
ADDED
|
Binary file
|
package/tmp/000619.sst
ADDED
|
Binary file
|
package/tmp/000620.sst
ADDED
|
Binary file
|
package/tmp/000621.sst
ADDED
|
Binary file
|
package/tmp/000622.sst
ADDED
|
Binary file
|
package/tmp/000623.sst
ADDED
|
Binary file
|
package/tmp/000624.sst
ADDED
|
Binary file
|
package/tmp/000625.sst
ADDED
|
Binary file
|
package/tmp/000626.sst
ADDED
|
Binary file
|
package/tmp/000627.sst
ADDED
|
Binary file
|
package/tmp/000628.sst
ADDED
|
Binary file
|
package/tmp/000629.sst
ADDED
|
Binary file
|
package/tmp/000630.sst
ADDED
|
Binary file
|
package/tmp/000631.sst
ADDED
|
Binary file
|
package/tmp/CURRENT
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
MANIFEST-
|
|
1
|
+
MANIFEST-000546
|
|
Binary file
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
#
|
|
6
6
|
|
|
7
7
|
[Version]
|
|
8
|
-
rocksdb_version=9.
|
|
8
|
+
rocksdb_version=9.6.1
|
|
9
9
|
options_file_version=1.1
|
|
10
10
|
|
|
11
11
|
[DBOptions]
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
max_background_jobs=4
|
|
27
27
|
delete_obsolete_files_period_micros=21600000000
|
|
28
28
|
writable_file_max_buffer_size=1048576
|
|
29
|
+
wal_write_temperature=kUnknown
|
|
29
30
|
follower_catchup_retry_wait_ms=100
|
|
30
31
|
file_checksum_gen_factory=nullptr
|
|
31
32
|
allow_data_in_errors=false
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
allow_concurrent_memtable_write=true
|
|
49
50
|
paranoid_checks=true
|
|
50
51
|
WAL_size_limit_MB=0
|
|
52
|
+
metadata_write_temperature=kUnknown
|
|
51
53
|
lowest_used_cache_tier=kNonVolatileBlockTier
|
|
52
54
|
keep_log_file_num=1000
|
|
53
55
|
table_cache_numshardbits=6
|
|
@@ -121,6 +123,7 @@
|
|
|
121
123
|
inplace_update_num_locks=10000
|
|
122
124
|
enable_blob_garbage_collection=false
|
|
123
125
|
arena_block_size=1048576
|
|
126
|
+
paranoid_memory_checks=false
|
|
124
127
|
bottommost_compression_opts={use_zstd_dict_trainer=true;enabled=false;zstd_max_train_bytes=0;parallel_threads=1;max_compressed_bytes_per_kb=896;checksum=false;max_dict_bytes=0;strategy=0;max_dict_buffer_bytes=0;level=32767;window_bits=-14;}
|
|
125
128
|
target_file_size_multiplier=1
|
|
126
129
|
max_bytes_for_level_multiplier_additional=1:1:1:1:1:1:1
|
|
@@ -135,7 +138,7 @@
|
|
|
135
138
|
block_protection_bytes_per_key=0
|
|
136
139
|
prefix_extractor=nullptr
|
|
137
140
|
max_bytes_for_level_multiplier=10.000000
|
|
138
|
-
write_buffer_size=
|
|
141
|
+
write_buffer_size=32000000
|
|
139
142
|
uncache_aggressiveness=0
|
|
140
143
|
disable_auto_compactions=false
|
|
141
144
|
max_compaction_bytes=400000000
|
|
@@ -178,10 +181,11 @@
|
|
|
178
181
|
metadata_cache_options={unpartitioned_pinning=kFallback;partition_pinning=kFallback;top_level_index_pinning=kFallback;}
|
|
179
182
|
read_amp_bytes_per_bit=0
|
|
180
183
|
verify_compression=false
|
|
181
|
-
format_version=
|
|
184
|
+
format_version=6
|
|
185
|
+
detect_filter_construct_corruption=false
|
|
182
186
|
optimize_filters_for_memory=true
|
|
187
|
+
decouple_partitioned_filters=true
|
|
183
188
|
partition_filters=false
|
|
184
|
-
detect_filter_construct_corruption=false
|
|
185
189
|
initial_auto_readahead_size=8192
|
|
186
190
|
max_auto_readahead_size=262144
|
|
187
191
|
enable_index_compression=true
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# This is a RocksDB option file.
|
|
2
|
+
#
|
|
3
|
+
# For detailed file format spec, please refer to the example file
|
|
4
|
+
# in examples/rocksdb_option_file_example.ini
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
[Version]
|
|
8
|
+
rocksdb_version=9.6.1
|
|
9
|
+
options_file_version=1.1
|
|
10
|
+
|
|
11
|
+
[DBOptions]
|
|
12
|
+
max_background_flushes=-1
|
|
13
|
+
compaction_readahead_size=2097152
|
|
14
|
+
strict_bytes_per_sync=false
|
|
15
|
+
wal_bytes_per_sync=0
|
|
16
|
+
max_open_files=-1
|
|
17
|
+
stats_history_buffer_size=1048576
|
|
18
|
+
max_total_wal_size=0
|
|
19
|
+
stats_persist_period_sec=600
|
|
20
|
+
stats_dump_period_sec=600
|
|
21
|
+
avoid_flush_during_shutdown=false
|
|
22
|
+
max_subcompactions=1
|
|
23
|
+
bytes_per_sync=0
|
|
24
|
+
delayed_write_rate=16777216
|
|
25
|
+
max_background_compactions=-1
|
|
26
|
+
max_background_jobs=4
|
|
27
|
+
delete_obsolete_files_period_micros=21600000000
|
|
28
|
+
writable_file_max_buffer_size=1048576
|
|
29
|
+
wal_write_temperature=kUnknown
|
|
30
|
+
follower_catchup_retry_wait_ms=100
|
|
31
|
+
file_checksum_gen_factory=nullptr
|
|
32
|
+
allow_data_in_errors=false
|
|
33
|
+
max_bgerror_resume_count=2147483647
|
|
34
|
+
best_efforts_recovery=false
|
|
35
|
+
write_dbid_to_manifest=false
|
|
36
|
+
atomic_flush=false
|
|
37
|
+
manual_wal_flush=false
|
|
38
|
+
two_write_queues=false
|
|
39
|
+
avoid_flush_during_recovery=false
|
|
40
|
+
dump_malloc_stats=false
|
|
41
|
+
info_log_level=HEADER_LEVEL
|
|
42
|
+
write_thread_slow_yield_usec=3
|
|
43
|
+
unordered_write=false
|
|
44
|
+
allow_ingest_behind=false
|
|
45
|
+
fail_if_options_file_error=true
|
|
46
|
+
persist_stats_to_disk=false
|
|
47
|
+
WAL_ttl_seconds=0
|
|
48
|
+
bgerror_resume_retry_interval=1000000
|
|
49
|
+
allow_concurrent_memtable_write=true
|
|
50
|
+
paranoid_checks=true
|
|
51
|
+
WAL_size_limit_MB=0
|
|
52
|
+
metadata_write_temperature=kUnknown
|
|
53
|
+
lowest_used_cache_tier=kNonVolatileBlockTier
|
|
54
|
+
keep_log_file_num=1000
|
|
55
|
+
table_cache_numshardbits=6
|
|
56
|
+
max_file_opening_threads=16
|
|
57
|
+
random_access_max_buffer_size=1048576
|
|
58
|
+
follower_refresh_catchup_period_ms=10000
|
|
59
|
+
log_readahead_size=0
|
|
60
|
+
enable_pipelined_write=false
|
|
61
|
+
background_close_inactive_wals=false
|
|
62
|
+
wal_recovery_mode=kPointInTimeRecovery
|
|
63
|
+
follower_catchup_retry_count=10
|
|
64
|
+
db_write_buffer_size=0
|
|
65
|
+
allow_2pc=false
|
|
66
|
+
skip_checking_sst_file_sizes_on_db_open=false
|
|
67
|
+
skip_stats_update_on_db_open=false
|
|
68
|
+
recycle_log_file_num=0
|
|
69
|
+
db_host_id=__hostname__
|
|
70
|
+
track_and_verify_wals_in_manifest=false
|
|
71
|
+
use_fsync=false
|
|
72
|
+
wal_compression=kNoCompression
|
|
73
|
+
compaction_verify_record_count=true
|
|
74
|
+
error_if_exists=false
|
|
75
|
+
manifest_preallocation_size=4194304
|
|
76
|
+
is_fd_close_on_exec=true
|
|
77
|
+
enable_write_thread_adaptive_yield=true
|
|
78
|
+
enable_thread_tracking=false
|
|
79
|
+
avoid_unnecessary_blocking_io=true
|
|
80
|
+
allow_fallocate=true
|
|
81
|
+
max_log_file_size=0
|
|
82
|
+
advise_random_on_open=true
|
|
83
|
+
create_missing_column_families=true
|
|
84
|
+
max_write_batch_group_size_bytes=1048576
|
|
85
|
+
use_adaptive_mutex=false
|
|
86
|
+
wal_filter=nullptr
|
|
87
|
+
create_if_missing=true
|
|
88
|
+
enforce_single_del_contracts=true
|
|
89
|
+
allow_mmap_writes=false
|
|
90
|
+
verify_sst_unique_id_in_manifest=true
|
|
91
|
+
log_file_time_to_roll=0
|
|
92
|
+
use_direct_io_for_flush_and_compaction=false
|
|
93
|
+
flush_verify_memtable_count=true
|
|
94
|
+
max_manifest_file_size=1073741824
|
|
95
|
+
write_thread_max_yield_usec=100
|
|
96
|
+
use_direct_reads=false
|
|
97
|
+
allow_mmap_reads=false
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
[CFOptions "default"]
|
|
101
|
+
bottommost_file_compaction_delay=0
|
|
102
|
+
memtable_protection_bytes_per_key=0
|
|
103
|
+
compression_per_level=kNoCompression:kNoCompression:kZSTD:kZSTD:kZSTD:kZSTD:kZSTD
|
|
104
|
+
bottommost_compression=kDisableCompressionOption
|
|
105
|
+
sample_for_compression=0
|
|
106
|
+
blob_garbage_collection_age_cutoff=0.250000
|
|
107
|
+
blob_compression_type=kNoCompression
|
|
108
|
+
compression=kZSTD
|
|
109
|
+
default_write_temperature=kUnknown
|
|
110
|
+
last_level_temperature=kUnknown
|
|
111
|
+
compaction_options_universal={allow_trivial_move=false;stop_style=kCompactionStopStyleTotalSize;max_read_amp=-1;min_merge_width=2;compression_size_percent=-1;max_size_amplification_percent=200;incremental=false;max_merge_width=4294967295;size_ratio=1;}
|
|
112
|
+
target_file_size_base=16000000
|
|
113
|
+
memtable_whole_key_filtering=false
|
|
114
|
+
blob_file_starting_level=0
|
|
115
|
+
soft_pending_compaction_bytes_limit=68719476736
|
|
116
|
+
max_write_buffer_number=6
|
|
117
|
+
ttl=2592000
|
|
118
|
+
compaction_options_fifo={file_temperature_age_thresholds=;allow_compaction=false;age_for_warm=0;max_table_files_size=1073741824;}
|
|
119
|
+
memtable_huge_page_size=0
|
|
120
|
+
max_sequential_skip_in_iterations=8
|
|
121
|
+
strict_max_successive_merges=false
|
|
122
|
+
max_successive_merges=0
|
|
123
|
+
inplace_update_num_locks=10000
|
|
124
|
+
enable_blob_garbage_collection=false
|
|
125
|
+
arena_block_size=1048576
|
|
126
|
+
paranoid_memory_checks=false
|
|
127
|
+
bottommost_compression_opts={use_zstd_dict_trainer=true;enabled=false;zstd_max_train_bytes=0;parallel_threads=1;max_compressed_bytes_per_kb=896;checksum=false;max_dict_bytes=0;strategy=0;max_dict_buffer_bytes=0;level=32767;window_bits=-14;}
|
|
128
|
+
target_file_size_multiplier=1
|
|
129
|
+
max_bytes_for_level_multiplier_additional=1:1:1:1:1:1:1
|
|
130
|
+
prepopulate_blob_cache=kDisable
|
|
131
|
+
blob_compaction_readahead_size=0
|
|
132
|
+
min_blob_size=0
|
|
133
|
+
level0_stop_writes_trigger=36
|
|
134
|
+
blob_garbage_collection_force_threshold=1.000000
|
|
135
|
+
enable_blob_files=false
|
|
136
|
+
level0_slowdown_writes_trigger=20
|
|
137
|
+
level0_file_num_compaction_trigger=2
|
|
138
|
+
block_protection_bytes_per_key=0
|
|
139
|
+
prefix_extractor=nullptr
|
|
140
|
+
max_bytes_for_level_multiplier=10.000000
|
|
141
|
+
write_buffer_size=32000000
|
|
142
|
+
uncache_aggressiveness=0
|
|
143
|
+
disable_auto_compactions=false
|
|
144
|
+
max_compaction_bytes=400000000
|
|
145
|
+
memtable_max_range_deletions=0
|
|
146
|
+
compression_opts={use_zstd_dict_trainer=true;enabled=false;zstd_max_train_bytes=1638400;parallel_threads=1;max_compressed_bytes_per_kb=896;checksum=false;max_dict_bytes=16384;strategy=0;max_dict_buffer_bytes=0;level=32767;window_bits=-14;}
|
|
147
|
+
hard_pending_compaction_bytes_limit=274877906944
|
|
148
|
+
blob_file_size=268435456
|
|
149
|
+
periodic_compaction_seconds=0
|
|
150
|
+
paranoid_file_checks=false
|
|
151
|
+
experimental_mempurge_threshold=0.000000
|
|
152
|
+
memtable_prefix_bloom_size_ratio=0.000000
|
|
153
|
+
max_bytes_for_level_base=128000000
|
|
154
|
+
report_bg_io_stats=false
|
|
155
|
+
sst_partitioner_factory=nullptr
|
|
156
|
+
compaction_pri=kMinOverlappingRatio
|
|
157
|
+
compaction_style=kCompactionStyleLevel
|
|
158
|
+
compaction_filter_factory=nullptr
|
|
159
|
+
compaction_filter=nullptr
|
|
160
|
+
memtable_factory=SkipListFactory
|
|
161
|
+
comparator=leveldb.BytewiseComparator
|
|
162
|
+
bloom_locality=0
|
|
163
|
+
min_write_buffer_number_to_merge=2
|
|
164
|
+
table_factory=BlockBasedTable
|
|
165
|
+
max_write_buffer_size_to_maintain=0
|
|
166
|
+
max_write_buffer_number_to_maintain=0
|
|
167
|
+
optimize_filters_for_hits=false
|
|
168
|
+
default_temperature=kUnknown
|
|
169
|
+
preserve_internal_time_seconds=0
|
|
170
|
+
force_consistency_checks=true
|
|
171
|
+
merge_operator=nullptr
|
|
172
|
+
num_levels=7
|
|
173
|
+
memtable_insert_with_hint_prefix_extractor=nullptr
|
|
174
|
+
level_compaction_dynamic_level_bytes=true
|
|
175
|
+
persist_user_defined_timestamps=true
|
|
176
|
+
preclude_last_level_data_seconds=0
|
|
177
|
+
inplace_update_support=false
|
|
178
|
+
|
|
179
|
+
[TableOptions/BlockBasedTable "default"]
|
|
180
|
+
num_file_reads_for_auto_readahead=2
|
|
181
|
+
metadata_cache_options={unpartitioned_pinning=kFallback;partition_pinning=kFallback;top_level_index_pinning=kFallback;}
|
|
182
|
+
read_amp_bytes_per_bit=0
|
|
183
|
+
verify_compression=false
|
|
184
|
+
format_version=6
|
|
185
|
+
detect_filter_construct_corruption=false
|
|
186
|
+
optimize_filters_for_memory=true
|
|
187
|
+
decouple_partitioned_filters=true
|
|
188
|
+
partition_filters=false
|
|
189
|
+
initial_auto_readahead_size=8192
|
|
190
|
+
max_auto_readahead_size=262144
|
|
191
|
+
enable_index_compression=true
|
|
192
|
+
checksum=kXXH3
|
|
193
|
+
index_block_restart_interval=1
|
|
194
|
+
pin_top_level_index_and_filter=true
|
|
195
|
+
block_align=false
|
|
196
|
+
block_size=4096
|
|
197
|
+
index_type=kBinarySearch
|
|
198
|
+
filter_policy=bloomfilter:10:false
|
|
199
|
+
metadata_block_size=4096
|
|
200
|
+
no_block_cache=false
|
|
201
|
+
whole_key_filtering=true
|
|
202
|
+
index_shortening=kShortenSeparators
|
|
203
|
+
block_size_deviation=10
|
|
204
|
+
data_block_index_type=kDataBlockBinarySearch
|
|
205
|
+
use_delta_encoding=true
|
|
206
|
+
data_block_hash_table_util_ratio=0.750000
|
|
207
|
+
cache_index_and_filter_blocks=false
|
|
208
|
+
prepopulate_block_cache=kDisable
|
|
209
|
+
block_restart_interval=16
|
|
210
|
+
pin_l0_filter_and_index_blocks_in_cache=false
|
|
211
|
+
cache_index_and_filter_blocks_with_high_priority=true
|
|
212
|
+
flush_block_policy_factory=FlushBlockBySizePolicyFactory
|
|
213
|
+
|
package/util.h
CHANGED
|
@@ -271,6 +271,27 @@ napi_status Convert(napi_env env, T&& s, Encoding encoding, napi_value& result)
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
napi_status ConvertUnsafe(napi_env env, rocksdb::PinnableSlice&& s, Encoding encoding, napi_value& result) {
|
|
275
|
+
if (encoding == Encoding::Buffer) {
|
|
276
|
+
auto s2 = new rocksdb::PinnableSlice(std::move(s));
|
|
277
|
+
return napi_create_external_buffer(env, s2->size(), const_cast<char*>(s2->data()), Finalize<rocksdb::PinnableSlice>, s2, &result);
|
|
278
|
+
} else if (encoding == Encoding::String) {
|
|
279
|
+
return napi_create_string_utf8(env, s.data(), s.size(), &result);
|
|
280
|
+
} else {
|
|
281
|
+
return napi_invalid_arg;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
napi_status Convert(napi_env env, rocksdb::PinnableSlice&& s, Encoding encoding, napi_value& result) {
|
|
286
|
+
if (encoding == Encoding::Buffer) {
|
|
287
|
+
return napi_create_buffer_copy(env, s.size(), s.data(), nullptr, &result);
|
|
288
|
+
} else if (encoding == Encoding::String) {
|
|
289
|
+
return napi_create_string_utf8(env, s.data(), s.size(), &result);
|
|
290
|
+
} else {
|
|
291
|
+
return napi_invalid_arg;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
274
295
|
template <typename State, typename T1, typename T2>
|
|
275
296
|
napi_status runAsync(State&& state,
|
|
276
297
|
const std::string& name,
|
package/tmp/000004.log
DELETED
|
Binary file
|
package/tmp/MANIFEST-000005
DELETED
|
Binary file
|