@nxtedition/rocksdb 6.0.1 → 7.0.0-alpha.1
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/BUILDING.md +12 -4
- package/binding.cc +421 -40
- package/deps/rocksdb/build_version.cc +4 -10
- package/deps/rocksdb/rocksdb/CMakeLists.txt +26 -3
- package/deps/rocksdb/rocksdb/Makefile +73 -91
- package/deps/rocksdb/rocksdb/TARGETS +27 -2
- package/deps/rocksdb/rocksdb/cache/cache_test.cc +29 -17
- package/deps/rocksdb/rocksdb/cache/fast_lru_cache.cc +511 -0
- package/deps/rocksdb/rocksdb/cache/fast_lru_cache.h +299 -0
- package/deps/rocksdb/rocksdb/cache/lru_cache.cc +3 -0
- package/deps/rocksdb/rocksdb/cache/lru_cache.h +7 -0
- package/deps/rocksdb/rocksdb/cmake/modules/CxxFlags.cmake +7 -0
- package/deps/rocksdb/rocksdb/cmake/modules/FindJeMalloc.cmake +29 -0
- package/deps/rocksdb/rocksdb/cmake/modules/FindNUMA.cmake +29 -0
- package/deps/rocksdb/rocksdb/cmake/modules/FindSnappy.cmake +29 -0
- package/deps/rocksdb/rocksdb/cmake/modules/FindTBB.cmake +33 -0
- package/deps/rocksdb/rocksdb/cmake/modules/Findgflags.cmake +29 -0
- package/deps/rocksdb/rocksdb/cmake/modules/Findlz4.cmake +29 -0
- package/deps/rocksdb/rocksdb/cmake/modules/Finduring.cmake +26 -0
- package/deps/rocksdb/rocksdb/cmake/modules/Findzstd.cmake +29 -0
- package/deps/rocksdb/rocksdb/cmake/modules/ReadVersion.cmake +10 -0
- package/deps/rocksdb/rocksdb/common.mk +30 -0
- package/deps/rocksdb/rocksdb/crash_test.mk +3 -3
- package/deps/rocksdb/rocksdb/db/arena_wrapped_db_iter.cc +1 -1
- package/deps/rocksdb/rocksdb/db/blob/blob_index.h +3 -3
- package/deps/rocksdb/rocksdb/db/blob/db_blob_index_test.cc +7 -7
- package/deps/rocksdb/rocksdb/db/builder.cc +22 -7
- package/deps/rocksdb/rocksdb/db/c.cc +71 -0
- package/deps/rocksdb/rocksdb/db/c_test.c +28 -2
- package/deps/rocksdb/rocksdb/db/column_family.cc +12 -5
- package/deps/rocksdb/rocksdb/db/column_family_test.cc +23 -22
- package/deps/rocksdb/rocksdb/db/compact_files_test.cc +11 -11
- package/deps/rocksdb/rocksdb/db/compaction/compaction.cc +2 -2
- package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator.cc +36 -10
- package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator.h +4 -1
- package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator_test.cc +3 -2
- package/deps/rocksdb/rocksdb/db/compaction/compaction_job.cc +54 -16
- package/deps/rocksdb/rocksdb/db/compaction/compaction_job.h +14 -2
- package/deps/rocksdb/rocksdb/db/compaction/compaction_job_stats_test.cc +3 -3
- package/deps/rocksdb/rocksdb/db/compaction/compaction_job_test.cc +85 -18
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker.cc +7 -7
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_level.cc +1 -1
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_test.cc +23 -22
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_universal.cc +1 -1
- package/deps/rocksdb/rocksdb/db/compaction/compaction_service_test.cc +151 -32
- package/deps/rocksdb/rocksdb/db/comparator_db_test.cc +1 -1
- package/deps/rocksdb/rocksdb/db/convenience.cc +8 -6
- package/deps/rocksdb/rocksdb/db/corruption_test.cc +209 -38
- package/deps/rocksdb/rocksdb/db/cuckoo_table_db_test.cc +2 -2
- package/deps/rocksdb/rocksdb/db/db_basic_test.cc +404 -32
- package/deps/rocksdb/rocksdb/db/db_block_cache_test.cc +28 -25
- package/deps/rocksdb/rocksdb/db/db_bloom_filter_test.cc +85 -138
- package/deps/rocksdb/rocksdb/db/db_compaction_filter_test.cc +68 -3
- package/deps/rocksdb/rocksdb/db/db_compaction_test.cc +38 -13
- package/deps/rocksdb/rocksdb/db/db_filesnapshot.cc +1 -1
- package/deps/rocksdb/rocksdb/db/db_flush_test.cc +1 -1
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl.cc +11 -20
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl.h +15 -1
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc +12 -9
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_debug.cc +5 -4
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_experimental.cc +1 -1
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_files.cc +2 -2
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_open.cc +42 -10
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_readonly.cc +54 -23
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_readonly.h +3 -0
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_secondary.cc +14 -4
- package/deps/rocksdb/rocksdb/db/db_info_dumper.cc +26 -18
- package/deps/rocksdb/rocksdb/db/db_iter_stress_test.cc +8 -7
- package/deps/rocksdb/rocksdb/db/db_iter_test.cc +8 -8
- package/deps/rocksdb/rocksdb/db/db_iterator_test.cc +6 -3
- package/deps/rocksdb/rocksdb/db/db_kv_checksum_test.cc +2 -2
- package/deps/rocksdb/rocksdb/db/db_log_iter_test.cc +6 -6
- package/deps/rocksdb/rocksdb/db/db_memtable_test.cc +2 -2
- package/deps/rocksdb/rocksdb/db/db_options_test.cc +28 -12
- package/deps/rocksdb/rocksdb/db/db_properties_test.cc +16 -15
- package/deps/rocksdb/rocksdb/db/db_range_del_test.cc +6 -4
- package/deps/rocksdb/rocksdb/db/db_readonly_with_timestamp_test.cc +331 -0
- package/deps/rocksdb/rocksdb/db/db_secondary_test.cc +11 -6
- package/deps/rocksdb/rocksdb/db/db_sst_test.cc +68 -7
- package/deps/rocksdb/rocksdb/db/db_table_properties_test.cc +6 -5
- package/deps/rocksdb/rocksdb/db/db_test.cc +60 -42
- package/deps/rocksdb/rocksdb/db/db_test2.cc +244 -111
- package/deps/rocksdb/rocksdb/db/db_test_util.cc +101 -19
- package/deps/rocksdb/rocksdb/db/db_test_util.h +52 -2
- package/deps/rocksdb/rocksdb/db/db_universal_compaction_test.cc +1 -1
- package/deps/rocksdb/rocksdb/db/db_wal_test.cc +7 -7
- package/deps/rocksdb/rocksdb/db/db_with_timestamp_basic_test.cc +5 -175
- package/deps/rocksdb/rocksdb/db/db_with_timestamp_test_util.cc +96 -0
- package/deps/rocksdb/rocksdb/db/db_with_timestamp_test_util.h +126 -0
- package/deps/rocksdb/rocksdb/db/db_write_test.cc +6 -6
- package/deps/rocksdb/rocksdb/db/dbformat.h +2 -1
- package/deps/rocksdb/rocksdb/db/deletefile_test.cc +1 -1
- package/deps/rocksdb/rocksdb/db/error_handler_fs_test.cc +8 -8
- package/deps/rocksdb/rocksdb/db/experimental.cc +1 -1
- package/deps/rocksdb/rocksdb/db/external_sst_file_basic_test.cc +91 -12
- package/deps/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc +16 -2
- package/deps/rocksdb/rocksdb/db/external_sst_file_ingestion_job.h +2 -0
- package/deps/rocksdb/rocksdb/db/external_sst_file_test.cc +7 -7
- package/deps/rocksdb/rocksdb/db/file_indexer.h +1 -4
- package/deps/rocksdb/rocksdb/db/flush_job.cc +28 -15
- package/deps/rocksdb/rocksdb/db/flush_job.h +4 -0
- package/deps/rocksdb/rocksdb/db/flush_job_test.cc +98 -30
- package/deps/rocksdb/rocksdb/db/forward_iterator.cc +1 -1
- package/deps/rocksdb/rocksdb/db/import_column_family_job.cc +14 -1
- package/deps/rocksdb/rocksdb/db/import_column_family_test.cc +6 -0
- package/deps/rocksdb/rocksdb/db/internal_stats.cc +12 -12
- package/deps/rocksdb/rocksdb/db/listener_test.cc +4 -3
- package/deps/rocksdb/rocksdb/db/memtable.cc +2 -2
- package/deps/rocksdb/rocksdb/db/memtable_list.h +1 -1
- package/deps/rocksdb/rocksdb/db/memtable_list_test.cc +37 -25
- package/deps/rocksdb/rocksdb/db/obsolete_files_test.cc +1 -1
- package/deps/rocksdb/rocksdb/db/perf_context_test.cc +18 -18
- package/deps/rocksdb/rocksdb/db/plain_table_db_test.cc +6 -6
- package/deps/rocksdb/rocksdb/db/prefix_test.cc +1 -1
- package/deps/rocksdb/rocksdb/db/repair.cc +13 -2
- package/deps/rocksdb/rocksdb/db/repair_test.cc +37 -15
- package/deps/rocksdb/rocksdb/db/snapshot_checker.h +1 -2
- package/deps/rocksdb/rocksdb/db/snapshot_impl.h +3 -1
- package/deps/rocksdb/rocksdb/db/table_cache.cc +20 -130
- package/deps/rocksdb/rocksdb/db/table_cache.h +3 -2
- package/deps/rocksdb/rocksdb/db/table_cache_sync_and_async.h +140 -0
- package/deps/rocksdb/rocksdb/db/version_builder.cc +1 -1
- package/deps/rocksdb/rocksdb/db/version_builder_test.cc +133 -133
- package/deps/rocksdb/rocksdb/db/version_edit.cc +22 -2
- package/deps/rocksdb/rocksdb/db/version_edit.h +13 -4
- package/deps/rocksdb/rocksdb/db/version_edit_test.cc +14 -14
- package/deps/rocksdb/rocksdb/db/version_set.cc +207 -214
- package/deps/rocksdb/rocksdb/db/version_set.h +14 -3
- package/deps/rocksdb/rocksdb/db/version_set_sync_and_async.h +154 -0
- package/deps/rocksdb/rocksdb/db/version_set_test.cc +10 -9
- package/deps/rocksdb/rocksdb/db/wal_edit.h +2 -1
- package/deps/rocksdb/rocksdb/db/wal_manager.cc +2 -3
- package/deps/rocksdb/rocksdb/db/wal_manager_test.cc +1 -1
- package/deps/rocksdb/rocksdb/db/write_batch.cc +178 -30
- package/deps/rocksdb/rocksdb/db/write_batch_test.cc +6 -6
- package/deps/rocksdb/rocksdb/db/write_controller.h +1 -1
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_common.cc +0 -2
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_common.h +9 -6
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_compaction_filter.h +2 -1
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_driver.cc +4 -3
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_gflags.cc +44 -6
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_listener.cc +4 -1
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_shared_state.cc +0 -10
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_shared_state.h +45 -42
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_test_base.cc +374 -275
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_test_base.h +53 -3
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_tool.cc +0 -12
- package/deps/rocksdb/rocksdb/db_stress_tool/expected_state.cc +13 -11
- package/deps/rocksdb/rocksdb/db_stress_tool/multi_ops_txns_stress.cc +276 -109
- package/deps/rocksdb/rocksdb/db_stress_tool/multi_ops_txns_stress.h +63 -0
- package/deps/rocksdb/rocksdb/db_stress_tool/no_batched_ops_stress.cc +45 -54
- package/deps/rocksdb/rocksdb/env/composite_env.cc +87 -14
- package/deps/rocksdb/rocksdb/env/env.cc +0 -60
- package/deps/rocksdb/rocksdb/env/env_encryption.cc +9 -0
- package/deps/rocksdb/rocksdb/env/env_encryption_ctr.h +1 -1
- package/deps/rocksdb/rocksdb/env/env_posix.cc +6 -5
- package/deps/rocksdb/rocksdb/env/env_test.cc +18 -5
- package/deps/rocksdb/rocksdb/env/fs_posix.cc +17 -12
- package/deps/rocksdb/rocksdb/env/io_posix.cc +39 -37
- package/deps/rocksdb/rocksdb/file/delete_scheduler_test.cc +9 -9
- package/deps/rocksdb/rocksdb/file/file_prefetch_buffer.cc +159 -65
- package/deps/rocksdb/rocksdb/file/file_prefetch_buffer.h +44 -22
- package/deps/rocksdb/rocksdb/file/file_util.h +2 -0
- package/deps/rocksdb/rocksdb/file/prefetch_test.cc +142 -17
- package/deps/rocksdb/rocksdb/file/random_access_file_reader.h +5 -2
- package/deps/rocksdb/rocksdb/file/sequence_file_reader.cc +7 -0
- package/deps/rocksdb/rocksdb/file/writable_file_writer.cc +60 -40
- package/deps/rocksdb/rocksdb/file/writable_file_writer.h +1 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/advanced_options.h +23 -5
- package/deps/rocksdb/rocksdb/include/rocksdb/c.h +49 -1
- package/deps/rocksdb/rocksdb/include/rocksdb/cache.h +5 -5
- package/deps/rocksdb/rocksdb/include/rocksdb/cleanable.h +59 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/compaction_filter.h +1 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/convenience.h +2 -1
- package/deps/rocksdb/rocksdb/include/rocksdb/db.h +46 -44
- package/deps/rocksdb/rocksdb/include/rocksdb/env.h +1 -1
- package/deps/rocksdb/rocksdb/include/rocksdb/file_system.h +2 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/iostats_context.h +2 -4
- package/deps/rocksdb/rocksdb/include/rocksdb/memtablerep.h +3 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/options.h +45 -3
- package/deps/rocksdb/rocksdb/include/rocksdb/perf_context.h +2 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/snapshot.h +4 -1
- package/deps/rocksdb/rocksdb/include/rocksdb/statistics.h +3 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/table.h +91 -40
- package/deps/rocksdb/rocksdb/include/rocksdb/thread_status.h +1 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/unique_id.h +22 -13
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/customizable_util.h +9 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/ldb_cmd.h +4 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/object_registry.h +25 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/options_type.h +378 -103
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/transaction_db.h +14 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/version.h +2 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/write_batch.h +18 -4
- package/deps/rocksdb/rocksdb/memory/arena.h +1 -1
- package/deps/rocksdb/rocksdb/memory/concurrent_arena.cc +1 -5
- package/deps/rocksdb/rocksdb/memory/concurrent_arena.h +1 -5
- package/deps/rocksdb/rocksdb/memory/jemalloc_nodump_allocator.cc +6 -8
- package/deps/rocksdb/rocksdb/memtable/skiplistrep.cc +1 -1
- package/deps/rocksdb/rocksdb/memtable/write_buffer_manager.cc +1 -1
- package/deps/rocksdb/rocksdb/memtable/write_buffer_manager_test.cc +5 -3
- package/deps/rocksdb/rocksdb/microbench/db_basic_bench.cc +266 -45
- package/deps/rocksdb/rocksdb/monitoring/histogram.cc +2 -1
- package/deps/rocksdb/rocksdb/monitoring/iostats_context.cc +1 -4
- package/deps/rocksdb/rocksdb/monitoring/iostats_context_imp.h +4 -4
- package/deps/rocksdb/rocksdb/monitoring/perf_context.cc +7 -8
- package/deps/rocksdb/rocksdb/monitoring/perf_context_imp.h +2 -2
- package/deps/rocksdb/rocksdb/monitoring/perf_level.cc +1 -5
- package/deps/rocksdb/rocksdb/monitoring/perf_level_imp.h +1 -5
- package/deps/rocksdb/rocksdb/monitoring/persistent_stats_history.cc +2 -2
- package/deps/rocksdb/rocksdb/monitoring/statistics.cc +1 -1
- package/deps/rocksdb/rocksdb/monitoring/thread_status_updater.cc +2 -1
- package/deps/rocksdb/rocksdb/monitoring/thread_status_updater.h +1 -1
- package/deps/rocksdb/rocksdb/monitoring/thread_status_util.cc +3 -3
- package/deps/rocksdb/rocksdb/monitoring/thread_status_util.h +2 -2
- package/deps/rocksdb/rocksdb/options/cf_options.cc +47 -38
- package/deps/rocksdb/rocksdb/options/configurable.cc +9 -27
- package/deps/rocksdb/rocksdb/options/configurable_test.cc +1 -1
- package/deps/rocksdb/rocksdb/options/customizable.cc +3 -1
- package/deps/rocksdb/rocksdb/options/customizable_test.cc +379 -318
- package/deps/rocksdb/rocksdb/options/db_options.cc +46 -17
- package/deps/rocksdb/rocksdb/options/db_options.h +2 -0
- package/deps/rocksdb/rocksdb/options/options.cc +7 -0
- package/deps/rocksdb/rocksdb/options/options_helper.cc +86 -39
- package/deps/rocksdb/rocksdb/options/options_parser.cc +10 -10
- package/deps/rocksdb/rocksdb/options/options_settable_test.cc +12 -7
- package/deps/rocksdb/rocksdb/options/options_test.cc +222 -68
- package/deps/rocksdb/rocksdb/port/port_posix.h +0 -15
- package/deps/rocksdb/rocksdb/port/win/env_win.cc +5 -4
- package/deps/rocksdb/rocksdb/port/win/env_win.h +2 -2
- package/deps/rocksdb/rocksdb/port/win/port_win.h +0 -31
- package/deps/rocksdb/rocksdb/rocksdb.pc.in +11 -0
- package/deps/rocksdb/rocksdb/src.mk +6 -1
- package/deps/rocksdb/rocksdb/table/block_based/binary_search_index_reader.cc +2 -1
- package/deps/rocksdb/rocksdb/table/block_based/block.cc +4 -2
- package/deps/rocksdb/rocksdb/table/block_based/block.h +21 -25
- package/deps/rocksdb/rocksdb/table/block_based/block_based_filter_block.cc +3 -4
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_builder.cc +23 -8
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_factory.cc +52 -15
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_iterator.cc +81 -7
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_iterator.h +8 -2
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc +94 -726
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader.h +21 -15
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_impl.h +9 -3
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_sync_and_async.h +754 -0
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_test.cc +44 -73
- package/deps/rocksdb/rocksdb/table/block_based/block_prefetcher.cc +15 -5
- package/deps/rocksdb/rocksdb/table/block_based/block_prefetcher.h +2 -1
- package/deps/rocksdb/rocksdb/table/block_based/filter_block.h +2 -11
- package/deps/rocksdb/rocksdb/table/block_based/filter_block_reader_common.cc +59 -1
- package/deps/rocksdb/rocksdb/table/block_based/filter_block_reader_common.h +18 -0
- package/deps/rocksdb/rocksdb/table/block_based/filter_policy.cc +33 -17
- package/deps/rocksdb/rocksdb/table/block_based/full_filter_block.cc +0 -61
- package/deps/rocksdb/rocksdb/table/block_based/full_filter_block.h +0 -13
- package/deps/rocksdb/rocksdb/table/block_based/hash_index_reader.cc +2 -1
- package/deps/rocksdb/rocksdb/table/block_based/index_builder.h +2 -2
- package/deps/rocksdb/rocksdb/table/block_based/index_reader_common.cc +3 -2
- package/deps/rocksdb/rocksdb/table/block_based/index_reader_common.h +2 -1
- package/deps/rocksdb/rocksdb/table/block_based/partitioned_filter_block.cc +3 -2
- package/deps/rocksdb/rocksdb/table/block_based/partitioned_index_iterator.cc +4 -3
- package/deps/rocksdb/rocksdb/table/block_based/partitioned_index_reader.cc +8 -4
- package/deps/rocksdb/rocksdb/table/block_based/reader_common.cc +4 -4
- package/deps/rocksdb/rocksdb/table/block_based/uncompression_dict_reader.cc +2 -1
- package/deps/rocksdb/rocksdb/table/block_fetcher.cc +65 -7
- package/deps/rocksdb/rocksdb/table/block_fetcher.h +2 -0
- package/deps/rocksdb/rocksdb/table/cleanable_test.cc +113 -0
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_builder.cc +1 -1
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_builder.h +1 -1
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_reader_test.cc +1 -1
- package/deps/rocksdb/rocksdb/table/format.cc +22 -20
- package/deps/rocksdb/rocksdb/table/iterator.cc +1 -81
- package/deps/rocksdb/rocksdb/table/merging_iterator.cc +39 -0
- package/deps/rocksdb/rocksdb/table/meta_blocks.cc +2 -2
- package/deps/rocksdb/rocksdb/table/multiget_context.h +60 -13
- package/deps/rocksdb/rocksdb/table/persistent_cache_options.h +0 -3
- package/deps/rocksdb/rocksdb/table/plain/plain_table_factory.cc +12 -1
- package/deps/rocksdb/rocksdb/table/plain/plain_table_reader.cc +4 -4
- package/deps/rocksdb/rocksdb/table/sst_file_dumper.cc +2 -1
- package/deps/rocksdb/rocksdb/table/sst_file_dumper.h +1 -1
- package/deps/rocksdb/rocksdb/table/sst_file_writer_collectors.h +1 -1
- package/deps/rocksdb/rocksdb/table/table_properties.cc +3 -5
- package/deps/rocksdb/rocksdb/table/table_reader.h +13 -0
- package/deps/rocksdb/rocksdb/table/table_test.cc +202 -78
- package/deps/rocksdb/rocksdb/table/unique_id.cc +84 -25
- package/deps/rocksdb/rocksdb/table/unique_id_impl.h +37 -4
- package/deps/rocksdb/rocksdb/test_util/testutil.cc +3 -1
- package/deps/rocksdb/rocksdb/test_util/testutil.h +11 -8
- package/deps/rocksdb/rocksdb/test_util/transaction_test_util.cc +8 -4
- package/deps/rocksdb/rocksdb/test_util/transaction_test_util.h +17 -0
- package/deps/rocksdb/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.cc +11 -9
- package/deps/rocksdb/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer_test.cc +3 -3
- package/deps/rocksdb/rocksdb/tools/db_bench_tool.cc +277 -105
- package/deps/rocksdb/rocksdb/tools/db_sanity_test.cc +4 -4
- package/deps/rocksdb/rocksdb/tools/ldb_cmd.cc +186 -42
- package/deps/rocksdb/rocksdb/tools/ldb_cmd_impl.h +75 -49
- package/deps/rocksdb/rocksdb/tools/ldb_cmd_test.cc +9 -8
- package/deps/rocksdb/rocksdb/tools/ldb_tool.cc +4 -1
- package/deps/rocksdb/rocksdb/tools/reduce_levels_test.cc +2 -2
- package/deps/rocksdb/rocksdb/tools/sst_dump_tool.cc +26 -4
- package/deps/rocksdb/rocksdb/tools/trace_analyzer_tool.cc +1 -1
- package/deps/rocksdb/rocksdb/trace_replay/block_cache_tracer.h +1 -1
- package/deps/rocksdb/rocksdb/util/async_file_reader.cc +72 -0
- package/deps/rocksdb/rocksdb/util/async_file_reader.h +144 -0
- package/deps/rocksdb/rocksdb/util/autovector_test.cc +4 -4
- package/deps/rocksdb/rocksdb/util/bloom_test.cc +14 -8
- package/deps/rocksdb/rocksdb/util/build_version.cc.in +5 -6
- package/deps/rocksdb/rocksdb/util/cleanable.cc +180 -0
- package/deps/rocksdb/rocksdb/util/comparator.cc +5 -3
- package/deps/rocksdb/rocksdb/util/compression.h +56 -7
- package/deps/rocksdb/rocksdb/util/coro_utils.h +111 -0
- package/deps/rocksdb/rocksdb/util/file_reader_writer_test.cc +148 -0
- package/deps/rocksdb/rocksdb/util/filelock_test.cc +2 -2
- package/deps/rocksdb/rocksdb/util/filter_bench.cc +12 -4
- package/deps/rocksdb/rocksdb/util/heap.h +5 -3
- package/deps/rocksdb/rocksdb/util/random.cc +1 -5
- package/deps/rocksdb/rocksdb/util/rate_limiter.cc +12 -9
- package/deps/rocksdb/rocksdb/util/rate_limiter_test.cc +1 -1
- package/deps/rocksdb/rocksdb/util/ribbon_alg.h +1 -1
- package/deps/rocksdb/rocksdb/util/ribbon_test.cc +2 -4
- package/deps/rocksdb/rocksdb/util/single_thread_executor.h +55 -0
- package/deps/rocksdb/rocksdb/util/slice.cc +8 -9
- package/deps/rocksdb/rocksdb/util/string_util.cc +3 -2
- package/deps/rocksdb/rocksdb/util/string_util.h +0 -13
- package/deps/rocksdb/rocksdb/util/thread_local.cc +4 -23
- package/deps/rocksdb/rocksdb/utilities/backup/backup_engine.cc +99 -22
- package/deps/rocksdb/rocksdb/utilities/backup/backup_engine_impl.h +7 -0
- package/deps/rocksdb/rocksdb/utilities/backup/backup_engine_test.cc +102 -59
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_test.cc +38 -36
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_dump_tool.cc +2 -2
- package/deps/rocksdb/rocksdb/utilities/fault_injection_fs.cc +28 -0
- package/deps/rocksdb/rocksdb/utilities/fault_injection_fs.h +3 -0
- package/deps/rocksdb/rocksdb/utilities/memory/memory_test.cc +1 -1
- package/deps/rocksdb/rocksdb/utilities/object_registry.cc +71 -0
- package/deps/rocksdb/rocksdb/utilities/object_registry_test.cc +71 -0
- package/deps/rocksdb/rocksdb/utilities/options/options_util_test.cc +1 -1
- package/deps/rocksdb/rocksdb/utilities/simulator_cache/sim_cache_test.cc +5 -5
- package/deps/rocksdb/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.cc +3 -3
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_tracker.cc +0 -13
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_locking_test.cc +40 -0
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.cc +10 -8
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.h +4 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +17 -0
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc +7 -7
- package/deps/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction.cc +8 -1
- package/deps/rocksdb/rocksdb/utilities/transactions/snapshot_checker.cc +5 -1
- package/deps/rocksdb/rocksdb/utilities/transactions/transaction_test.cc +21 -15
- package/deps/rocksdb/rocksdb/utilities/transactions/transaction_util.cc +2 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_transaction_test.cc +69 -11
- package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn.cc +22 -9
- package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.cc +26 -5
- package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.h +17 -4
- package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_transaction_test.cc +19 -16
- package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn.cc +7 -3
- package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index.cc +3 -2
- package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.cc +2 -2
- package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.h +2 -2
- package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_test.cc +6 -6
- package/deps/rocksdb/rocksdb.gyp +20 -13
- package/index.js +187 -3
- package/iterator.js +1 -0
- package/package-lock.json +23687 -0
- package/package.json +2 -30
- package/prebuilds/darwin-arm64/node.napi.node +0 -0
- package/snapshot.js +23 -0
- package/deps/liburing/liburing/README +0 -46
- package/deps/liburing/liburing/test/232c93d07b74-test.c +0 -305
- package/deps/liburing/liburing/test/35fa71a030ca-test.c +0 -329
- package/deps/liburing/liburing/test/500f9fbadef8-test.c +0 -89
- package/deps/liburing/liburing/test/7ad0e4b2f83c-test.c +0 -93
- package/deps/liburing/liburing/test/8a9973408177-test.c +0 -106
- package/deps/liburing/liburing/test/917257daa0fe-test.c +0 -53
- package/deps/liburing/liburing/test/Makefile +0 -312
- package/deps/liburing/liburing/test/a0908ae19763-test.c +0 -58
- package/deps/liburing/liburing/test/a4c0b3decb33-test.c +0 -180
- package/deps/liburing/liburing/test/accept-link.c +0 -251
- package/deps/liburing/liburing/test/accept-reuse.c +0 -164
- package/deps/liburing/liburing/test/accept-test.c +0 -79
- package/deps/liburing/liburing/test/accept.c +0 -476
- package/deps/liburing/liburing/test/across-fork.c +0 -283
- package/deps/liburing/liburing/test/b19062a56726-test.c +0 -53
- package/deps/liburing/liburing/test/b5837bd5311d-test.c +0 -77
- package/deps/liburing/liburing/test/ce593a6c480a-test.c +0 -135
- package/deps/liburing/liburing/test/close-opath.c +0 -122
- package/deps/liburing/liburing/test/config +0 -10
- package/deps/liburing/liburing/test/connect.c +0 -398
- package/deps/liburing/liburing/test/cq-full.c +0 -96
- package/deps/liburing/liburing/test/cq-overflow.c +0 -294
- package/deps/liburing/liburing/test/cq-peek-batch.c +0 -102
- package/deps/liburing/liburing/test/cq-ready.c +0 -94
- package/deps/liburing/liburing/test/cq-size.c +0 -58
- package/deps/liburing/liburing/test/d4ae271dfaae-test.c +0 -96
- package/deps/liburing/liburing/test/d77a67ed5f27-test.c +0 -65
- package/deps/liburing/liburing/test/defer.c +0 -307
- package/deps/liburing/liburing/test/double-poll-crash.c +0 -186
- package/deps/liburing/liburing/test/eeed8b54e0df-test.c +0 -114
- package/deps/liburing/liburing/test/empty-eownerdead.c +0 -42
- package/deps/liburing/liburing/test/eventfd-disable.c +0 -151
- package/deps/liburing/liburing/test/eventfd-ring.c +0 -97
- package/deps/liburing/liburing/test/eventfd.c +0 -112
- package/deps/liburing/liburing/test/fadvise.c +0 -202
- package/deps/liburing/liburing/test/fallocate.c +0 -249
- package/deps/liburing/liburing/test/fc2a85cb02ef-test.c +0 -138
- package/deps/liburing/liburing/test/file-register.c +0 -843
- package/deps/liburing/liburing/test/file-update.c +0 -173
- package/deps/liburing/liburing/test/files-exit-hang-poll.c +0 -128
- package/deps/liburing/liburing/test/files-exit-hang-timeout.c +0 -134
- package/deps/liburing/liburing/test/fixed-link.c +0 -90
- package/deps/liburing/liburing/test/fsync.c +0 -224
- package/deps/liburing/liburing/test/hardlink.c +0 -136
- package/deps/liburing/liburing/test/helpers.c +0 -135
- package/deps/liburing/liburing/test/helpers.h +0 -67
- package/deps/liburing/liburing/test/io-cancel.c +0 -537
- package/deps/liburing/liburing/test/io_uring_enter.c +0 -296
- package/deps/liburing/liburing/test/io_uring_register.c +0 -664
- package/deps/liburing/liburing/test/io_uring_setup.c +0 -192
- package/deps/liburing/liburing/test/iopoll.c +0 -366
- package/deps/liburing/liburing/test/lfs-openat-write.c +0 -117
- package/deps/liburing/liburing/test/lfs-openat.c +0 -273
- package/deps/liburing/liburing/test/link-timeout.c +0 -1107
- package/deps/liburing/liburing/test/link.c +0 -496
- package/deps/liburing/liburing/test/link_drain.c +0 -229
- package/deps/liburing/liburing/test/madvise.c +0 -195
- package/deps/liburing/liburing/test/mkdir.c +0 -108
- package/deps/liburing/liburing/test/multicqes_drain.c +0 -383
- package/deps/liburing/liburing/test/nop-all-sizes.c +0 -107
- package/deps/liburing/liburing/test/nop.c +0 -115
- package/deps/liburing/liburing/test/open-close.c +0 -146
- package/deps/liburing/liburing/test/openat2.c +0 -240
- package/deps/liburing/liburing/test/personality.c +0 -204
- package/deps/liburing/liburing/test/pipe-eof.c +0 -81
- package/deps/liburing/liburing/test/pipe-reuse.c +0 -105
- package/deps/liburing/liburing/test/poll-cancel-ton.c +0 -139
- package/deps/liburing/liburing/test/poll-cancel.c +0 -135
- package/deps/liburing/liburing/test/poll-link.c +0 -227
- package/deps/liburing/liburing/test/poll-many.c +0 -208
- package/deps/liburing/liburing/test/poll-mshot-update.c +0 -273
- package/deps/liburing/liburing/test/poll-ring.c +0 -48
- package/deps/liburing/liburing/test/poll-v-poll.c +0 -353
- package/deps/liburing/liburing/test/poll.c +0 -109
- package/deps/liburing/liburing/test/probe.c +0 -137
- package/deps/liburing/liburing/test/read-write.c +0 -876
- package/deps/liburing/liburing/test/register-restrictions.c +0 -633
- package/deps/liburing/liburing/test/rename.c +0 -134
- package/deps/liburing/liburing/test/ring-leak.c +0 -173
- package/deps/liburing/liburing/test/ring-leak2.c +0 -249
- package/deps/liburing/liburing/test/rsrc_tags.c +0 -449
- package/deps/liburing/liburing/test/runtests-loop.sh +0 -16
- package/deps/liburing/liburing/test/runtests.sh +0 -170
- package/deps/liburing/liburing/test/rw_merge_test.c +0 -97
- package/deps/liburing/liburing/test/self.c +0 -91
- package/deps/liburing/liburing/test/send_recv.c +0 -291
- package/deps/liburing/liburing/test/send_recvmsg.c +0 -345
- package/deps/liburing/liburing/test/sendmsg_fs_cve.c +0 -198
- package/deps/liburing/liburing/test/shared-wq.c +0 -84
- package/deps/liburing/liburing/test/short-read.c +0 -75
- package/deps/liburing/liburing/test/shutdown.c +0 -163
- package/deps/liburing/liburing/test/sigfd-deadlock.c +0 -74
- package/deps/liburing/liburing/test/socket-rw-eagain.c +0 -156
- package/deps/liburing/liburing/test/socket-rw.c +0 -147
- package/deps/liburing/liburing/test/splice.c +0 -511
- package/deps/liburing/liburing/test/sq-full-cpp.cc +0 -45
- package/deps/liburing/liburing/test/sq-full.c +0 -45
- package/deps/liburing/liburing/test/sq-poll-dup.c +0 -200
- package/deps/liburing/liburing/test/sq-poll-kthread.c +0 -168
- package/deps/liburing/liburing/test/sq-poll-share.c +0 -137
- package/deps/liburing/liburing/test/sq-space_left.c +0 -159
- package/deps/liburing/liburing/test/sqpoll-cancel-hang.c +0 -159
- package/deps/liburing/liburing/test/sqpoll-disable-exit.c +0 -195
- package/deps/liburing/liburing/test/sqpoll-exit-hang.c +0 -77
- package/deps/liburing/liburing/test/sqpoll-sleep.c +0 -68
- package/deps/liburing/liburing/test/statx.c +0 -172
- package/deps/liburing/liburing/test/stdout.c +0 -232
- package/deps/liburing/liburing/test/submit-link-fail.c +0 -154
- package/deps/liburing/liburing/test/submit-reuse.c +0 -239
- package/deps/liburing/liburing/test/symlink.c +0 -116
- package/deps/liburing/liburing/test/teardowns.c +0 -58
- package/deps/liburing/liburing/test/thread-exit.c +0 -131
- package/deps/liburing/liburing/test/timeout-new.c +0 -246
- package/deps/liburing/liburing/test/timeout-overflow.c +0 -204
- package/deps/liburing/liburing/test/timeout.c +0 -1354
- package/deps/liburing/liburing/test/unlink.c +0 -111
- package/deps/liburing/liburing/test/wakeup-hang.c +0 -162
- package/deps/rocksdb/rocksdb/README.md +0 -32
- package/deps/rocksdb/rocksdb/microbench/README.md +0 -60
- package/deps/rocksdb/rocksdb/plugin/README.md +0 -43
- package/deps/rocksdb/rocksdb/port/README +0 -10
- package/deps/rocksdb/rocksdb/python.mk +0 -9
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/README +0 -13
- package/prebuilds/darwin-x64/node.napi.node +0 -0
- package/prebuilds/linux-arm64/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.node +0 -0
|
@@ -100,8 +100,9 @@ struct CompressionOptions {
|
|
|
100
100
|
//
|
|
101
101
|
// The dictionary is created by sampling the SST file data. If
|
|
102
102
|
// `zstd_max_train_bytes` is nonzero, the samples are passed through zstd's
|
|
103
|
-
// dictionary generator
|
|
104
|
-
//
|
|
103
|
+
// dictionary generator (see comments for option `use_zstd_dict_trainer` for
|
|
104
|
+
// detail on dictionary generator). If `zstd_max_train_bytes` is zero, the
|
|
105
|
+
// random samples are used directly as the dictionary.
|
|
105
106
|
//
|
|
106
107
|
// When compression dictionary is disabled, we compress and write each block
|
|
107
108
|
// before buffering data for the next one. When compression dictionary is
|
|
@@ -173,6 +174,20 @@ struct CompressionOptions {
|
|
|
173
174
|
// Default: 0 (unlimited)
|
|
174
175
|
uint64_t max_dict_buffer_bytes;
|
|
175
176
|
|
|
177
|
+
// Use zstd trainer to generate dictionaries. When this option is set to true,
|
|
178
|
+
// zstd_max_train_bytes of training data sampled from max_dict_buffer_bytes
|
|
179
|
+
// buffered data will be passed to zstd dictionary trainer to generate a
|
|
180
|
+
// dictionary of size max_dict_bytes.
|
|
181
|
+
//
|
|
182
|
+
// When this option is false, zstd's API ZDICT_finalizeDictionary() will be
|
|
183
|
+
// called to generate dictionaries. zstd_max_train_bytes of training sampled
|
|
184
|
+
// data will be passed to this API. Using this API should save CPU time on
|
|
185
|
+
// dictionary training, but the compression ratio may not be as good as using
|
|
186
|
+
// a dictionary trainer.
|
|
187
|
+
//
|
|
188
|
+
// Default: true
|
|
189
|
+
bool use_zstd_dict_trainer;
|
|
190
|
+
|
|
176
191
|
CompressionOptions()
|
|
177
192
|
: window_bits(-14),
|
|
178
193
|
level(kDefaultCompressionLevel),
|
|
@@ -181,11 +196,13 @@ struct CompressionOptions {
|
|
|
181
196
|
zstd_max_train_bytes(0),
|
|
182
197
|
parallel_threads(1),
|
|
183
198
|
enabled(false),
|
|
184
|
-
max_dict_buffer_bytes(0)
|
|
199
|
+
max_dict_buffer_bytes(0),
|
|
200
|
+
use_zstd_dict_trainer(true) {}
|
|
185
201
|
CompressionOptions(int wbits, int _lev, int _strategy,
|
|
186
202
|
uint32_t _max_dict_bytes, uint32_t _zstd_max_train_bytes,
|
|
187
203
|
uint32_t _parallel_threads, bool _enabled,
|
|
188
|
-
uint64_t _max_dict_buffer_bytes
|
|
204
|
+
uint64_t _max_dict_buffer_bytes,
|
|
205
|
+
bool _use_zstd_dict_trainer)
|
|
189
206
|
: window_bits(wbits),
|
|
190
207
|
level(_lev),
|
|
191
208
|
strategy(_strategy),
|
|
@@ -193,7 +210,8 @@ struct CompressionOptions {
|
|
|
193
210
|
zstd_max_train_bytes(_zstd_max_train_bytes),
|
|
194
211
|
parallel_threads(_parallel_threads),
|
|
195
212
|
enabled(_enabled),
|
|
196
|
-
max_dict_buffer_bytes(_max_dict_buffer_bytes)
|
|
213
|
+
max_dict_buffer_bytes(_max_dict_buffer_bytes),
|
|
214
|
+
use_zstd_dict_trainer(_use_zstd_dict_trainer) {}
|
|
197
215
|
};
|
|
198
216
|
|
|
199
217
|
// Temperature of a file. Used to pass to FileSystem for a different
|
|
@@ -63,6 +63,7 @@ extern "C" {
|
|
|
63
63
|
#endif
|
|
64
64
|
|
|
65
65
|
#include <stdarg.h>
|
|
66
|
+
#include <stdbool.h>
|
|
66
67
|
#include <stddef.h>
|
|
67
68
|
#include <stdint.h>
|
|
68
69
|
|
|
@@ -438,6 +439,38 @@ extern ROCKSDB_LIBRARY_API void rocksdb_multi_get_cf(
|
|
|
438
439
|
const size_t* keys_list_sizes, char** values_list,
|
|
439
440
|
size_t* values_list_sizes, char** errs);
|
|
440
441
|
|
|
442
|
+
// The MultiGet API that improves performance by batching operations
|
|
443
|
+
// in the read path for greater efficiency. Currently, only the block based
|
|
444
|
+
// table format with full filters are supported. Other table formats such
|
|
445
|
+
// as plain table, block based table with block based filters and
|
|
446
|
+
// partitioned indexes will still work, but will not get any performance
|
|
447
|
+
// benefits.
|
|
448
|
+
//
|
|
449
|
+
// Note that all the keys passed to this API are restricted to a single
|
|
450
|
+
// column family.
|
|
451
|
+
//
|
|
452
|
+
// Parameters -
|
|
453
|
+
// db - the RocksDB instance.
|
|
454
|
+
// options - ReadOptions
|
|
455
|
+
// column_family - ColumnFamilyHandle* that the keys belong to. All the keys
|
|
456
|
+
// passed to the API are restricted to a single column family
|
|
457
|
+
// num_keys - Number of keys to lookup
|
|
458
|
+
// keys_list - Pointer to C style array of keys with num_keys elements
|
|
459
|
+
// keys_list_sizes - Pointer to C style array of the size of corresponding key
|
|
460
|
+
// in key_list with num_keys elements.
|
|
461
|
+
// values - Pointer to C style array of PinnableSlices with num_keys elements
|
|
462
|
+
// statuses - Pointer to C style array of Status with num_keys elements
|
|
463
|
+
// sorted_input - If true, it means the input keys are already sorted by key
|
|
464
|
+
// order, so the MultiGet() API doesn't have to sort them
|
|
465
|
+
// again. If false, the keys will be copied and sorted
|
|
466
|
+
// internally by the API - the input array will not be
|
|
467
|
+
// modified
|
|
468
|
+
extern ROCKSDB_LIBRARY_API void rocksdb_batched_multi_get_cf(
|
|
469
|
+
rocksdb_t* db, const rocksdb_readoptions_t* options,
|
|
470
|
+
rocksdb_column_family_handle_t* column_family, size_t num_keys,
|
|
471
|
+
const char* const* keys_list, const size_t* keys_list_sizes,
|
|
472
|
+
rocksdb_pinnableslice_t** values, char** errs, const bool sorted_input);
|
|
473
|
+
|
|
441
474
|
// The value is only allocated (using malloc) and returned if it is found and
|
|
442
475
|
// value_found isn't NULL. In that case the user is responsible for freeing it.
|
|
443
476
|
extern ROCKSDB_LIBRARY_API unsigned char rocksdb_key_may_exist(
|
|
@@ -1008,6 +1041,12 @@ extern ROCKSDB_LIBRARY_API int
|
|
|
1008
1041
|
rocksdb_options_get_compression_options_zstd_max_train_bytes(
|
|
1009
1042
|
rocksdb_options_t* opt);
|
|
1010
1043
|
extern ROCKSDB_LIBRARY_API void
|
|
1044
|
+
rocksdb_options_set_compression_options_use_zstd_dict_trainer(
|
|
1045
|
+
rocksdb_options_t*, unsigned char);
|
|
1046
|
+
extern ROCKSDB_LIBRARY_API unsigned char
|
|
1047
|
+
rocksdb_options_get_compression_options_use_zstd_dict_trainer(
|
|
1048
|
+
rocksdb_options_t* opt);
|
|
1049
|
+
extern ROCKSDB_LIBRARY_API void
|
|
1011
1050
|
rocksdb_options_set_compression_options_parallel_threads(rocksdb_options_t*,
|
|
1012
1051
|
int);
|
|
1013
1052
|
extern ROCKSDB_LIBRARY_API int
|
|
@@ -1026,6 +1065,12 @@ extern ROCKSDB_LIBRARY_API void
|
|
|
1026
1065
|
rocksdb_options_set_bottommost_compression_options_zstd_max_train_bytes(
|
|
1027
1066
|
rocksdb_options_t*, int, unsigned char);
|
|
1028
1067
|
extern ROCKSDB_LIBRARY_API void
|
|
1068
|
+
rocksdb_options_set_bottommost_compression_options_use_zstd_dict_trainer(
|
|
1069
|
+
rocksdb_options_t*, unsigned char, unsigned char);
|
|
1070
|
+
extern ROCKSDB_LIBRARY_API unsigned char
|
|
1071
|
+
rocksdb_options_get_bottommost_compression_options_use_zstd_dict_trainer(
|
|
1072
|
+
rocksdb_options_t* opt);
|
|
1073
|
+
extern ROCKSDB_LIBRARY_API void
|
|
1029
1074
|
rocksdb_options_set_bottommost_compression_options_max_dict_buffer_bytes(
|
|
1030
1075
|
rocksdb_options_t*, uint64_t, unsigned char);
|
|
1031
1076
|
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_prefix_extractor(
|
|
@@ -1508,7 +1553,8 @@ enum {
|
|
|
1508
1553
|
rocksdb_env_lock_file_nanos,
|
|
1509
1554
|
rocksdb_env_unlock_file_nanos,
|
|
1510
1555
|
rocksdb_env_new_logger_nanos,
|
|
1511
|
-
|
|
1556
|
+
rocksdb_number_async_seek,
|
|
1557
|
+
rocksdb_total_metric_count = 69
|
|
1512
1558
|
};
|
|
1513
1559
|
|
|
1514
1560
|
extern ROCKSDB_LIBRARY_API void rocksdb_set_perf_level(int);
|
|
@@ -1766,6 +1812,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_lru_cache_options_set_memory_allocator(
|
|
|
1766
1812
|
|
|
1767
1813
|
extern ROCKSDB_LIBRARY_API rocksdb_cache_t* rocksdb_cache_create_lru(
|
|
1768
1814
|
size_t capacity);
|
|
1815
|
+
extern ROCKSDB_LIBRARY_API rocksdb_cache_t*
|
|
1816
|
+
rocksdb_cache_create_lru_with_strict_capacity_limit(size_t capacity);
|
|
1769
1817
|
extern ROCKSDB_LIBRARY_API rocksdb_cache_t* rocksdb_cache_create_lru_opts(
|
|
1770
1818
|
rocksdb_lru_cache_options_t*);
|
|
1771
1819
|
extern ROCKSDB_LIBRARY_API void rocksdb_cache_destroy(rocksdb_cache_t* cache);
|
|
@@ -559,15 +559,15 @@ enum class CacheEntryRole {
|
|
|
559
559
|
kIndexBlock,
|
|
560
560
|
// Other kinds of block-based table block
|
|
561
561
|
kOtherBlock,
|
|
562
|
-
// WriteBufferManager
|
|
562
|
+
// WriteBufferManager's charge to account for its memtable usage
|
|
563
563
|
kWriteBuffer,
|
|
564
|
-
//
|
|
565
|
-
//
|
|
564
|
+
// Compression dictionary building buffer's charge to account for
|
|
565
|
+
// its memory usage
|
|
566
566
|
kCompressionDictionaryBuildingBuffer,
|
|
567
|
-
// Filter
|
|
567
|
+
// Filter's charge to account for
|
|
568
568
|
// (new) bloom and ribbon filter construction's memory usage
|
|
569
569
|
kFilterConstruction,
|
|
570
|
-
// BlockBasedTableReader
|
|
570
|
+
// BlockBasedTableReader's charge to account for
|
|
571
571
|
// its memory usage
|
|
572
572
|
kBlockBasedTableReader,
|
|
573
573
|
// Default bucket, for miscellaneous cache entries. Do not use for
|
|
@@ -19,11 +19,12 @@ class Cleanable {
|
|
|
19
19
|
Cleanable(Cleanable&) = delete;
|
|
20
20
|
Cleanable& operator=(Cleanable&) = delete;
|
|
21
21
|
|
|
22
|
+
// Executes all the registered cleanups
|
|
22
23
|
~Cleanable();
|
|
23
24
|
|
|
24
25
|
// Move constructor and move assignment is allowed.
|
|
25
|
-
Cleanable(Cleanable&&);
|
|
26
|
-
Cleanable& operator=(Cleanable&&);
|
|
26
|
+
Cleanable(Cleanable&&) noexcept;
|
|
27
|
+
Cleanable& operator=(Cleanable&&) noexcept;
|
|
27
28
|
|
|
28
29
|
// Clients are allowed to register function/arg1/arg2 triples that
|
|
29
30
|
// will be invoked when this iterator is destroyed.
|
|
@@ -31,8 +32,14 @@ class Cleanable {
|
|
|
31
32
|
// Note that unlike all of the preceding methods, this method is
|
|
32
33
|
// not abstract and therefore clients should not override it.
|
|
33
34
|
using CleanupFunction = void (*)(void* arg1, void* arg2);
|
|
35
|
+
|
|
36
|
+
// Add another Cleanup to the list
|
|
34
37
|
void RegisterCleanup(CleanupFunction function, void* arg1, void* arg2);
|
|
38
|
+
|
|
39
|
+
// Move the cleanups owned by this Cleanable to another Cleanable, adding to
|
|
40
|
+
// any existing cleanups it has
|
|
35
41
|
void DelegateCleanupsTo(Cleanable* other);
|
|
42
|
+
|
|
36
43
|
// DoCleanup and also resets the pointers for reuse
|
|
37
44
|
inline void Reset() {
|
|
38
45
|
DoCleanup();
|
|
@@ -40,6 +47,8 @@ class Cleanable {
|
|
|
40
47
|
cleanup_.next = nullptr;
|
|
41
48
|
}
|
|
42
49
|
|
|
50
|
+
inline bool HasCleanups() { return cleanup_.function != nullptr; }
|
|
51
|
+
|
|
43
52
|
protected:
|
|
44
53
|
struct Cleanup {
|
|
45
54
|
CleanupFunction function;
|
|
@@ -68,4 +77,52 @@ class Cleanable {
|
|
|
68
77
|
}
|
|
69
78
|
};
|
|
70
79
|
|
|
80
|
+
// A copyable, reference-counted pointer to a simple Cleanable that only
|
|
81
|
+
// performs registered cleanups after all copies are destroy. This is like
|
|
82
|
+
// shared_ptr<Cleanable> but works more efficiently with wrapping the pointer
|
|
83
|
+
// in an outer Cleanable (see RegisterCopyWith() and MoveAsCleanupTo()).
|
|
84
|
+
// WARNING: if you create a reference cycle, for example:
|
|
85
|
+
// SharedCleanablePtr scp;
|
|
86
|
+
// scp.Allocate();
|
|
87
|
+
// scp.RegisterCopyWith(&*scp);
|
|
88
|
+
// It will prevent cleanups from ever happening!
|
|
89
|
+
class SharedCleanablePtr {
|
|
90
|
+
public:
|
|
91
|
+
// Empy/null pointer
|
|
92
|
+
SharedCleanablePtr() {}
|
|
93
|
+
// Copy and move constructors and assignment
|
|
94
|
+
SharedCleanablePtr(const SharedCleanablePtr& from);
|
|
95
|
+
SharedCleanablePtr(SharedCleanablePtr&& from) noexcept;
|
|
96
|
+
SharedCleanablePtr& operator=(const SharedCleanablePtr& from);
|
|
97
|
+
SharedCleanablePtr& operator=(SharedCleanablePtr&& from) noexcept;
|
|
98
|
+
// Destructor (decrement refcount if non-null)
|
|
99
|
+
~SharedCleanablePtr();
|
|
100
|
+
// Create a new simple Cleanable and make this assign this pointer to it.
|
|
101
|
+
// (Reset()s first if necessary.)
|
|
102
|
+
void Allocate();
|
|
103
|
+
// Reset to empty/null (decrement refcount if previously non-null)
|
|
104
|
+
void Reset();
|
|
105
|
+
// Dereference to pointed-to Cleanable
|
|
106
|
+
Cleanable& operator*();
|
|
107
|
+
Cleanable* operator->();
|
|
108
|
+
// Get as raw pointer to Cleanable
|
|
109
|
+
Cleanable* get();
|
|
110
|
+
|
|
111
|
+
// Creates a (virtual) copy of this SharedCleanablePtr and registers its
|
|
112
|
+
// destruction with target, so that the cleanups registered with the
|
|
113
|
+
// Cleanable pointed to by this can only happen after the cleanups in the
|
|
114
|
+
// target Cleanable are run.
|
|
115
|
+
// No-op if this is empty (nullptr).
|
|
116
|
+
void RegisterCopyWith(Cleanable* target);
|
|
117
|
+
|
|
118
|
+
// Moves (virtually) this shared pointer to a new cleanup in the target.
|
|
119
|
+
// This is essentilly a move semantics version of RegisterCopyWith(), for
|
|
120
|
+
// performance optimization. No-op if this is empty (nullptr).
|
|
121
|
+
void MoveAsCleanupTo(Cleanable* target);
|
|
122
|
+
|
|
123
|
+
private:
|
|
124
|
+
struct Impl;
|
|
125
|
+
Impl* ptr_ = nullptr;
|
|
126
|
+
};
|
|
127
|
+
|
|
71
128
|
} // namespace ROCKSDB_NAMESPACE
|
|
@@ -518,7 +518,8 @@ Status VerifySstFileChecksum(const Options& options,
|
|
|
518
518
|
Status VerifySstFileChecksum(const Options& options,
|
|
519
519
|
const EnvOptions& env_options,
|
|
520
520
|
const ReadOptions& read_options,
|
|
521
|
-
const std::string& file_path
|
|
521
|
+
const std::string& file_path,
|
|
522
|
+
const SequenceNumber& largest_seqno = 0);
|
|
522
523
|
#endif // ROCKSDB_LITE
|
|
523
524
|
|
|
524
525
|
} // namespace ROCKSDB_NAMESPACE
|
|
@@ -1440,39 +1440,6 @@ class DB {
|
|
|
1440
1440
|
virtual Status EnableFileDeletions(bool force = true) = 0;
|
|
1441
1441
|
|
|
1442
1442
|
#ifndef ROCKSDB_LITE
|
|
1443
|
-
// GetLiveFiles followed by GetSortedWalFiles can generate a lossless backup
|
|
1444
|
-
|
|
1445
|
-
// Retrieve the list of all files in the database. The files are
|
|
1446
|
-
// relative to the dbname and are not absolute paths. Despite being relative
|
|
1447
|
-
// paths, the file names begin with "/". The valid size of the manifest file
|
|
1448
|
-
// is returned in manifest_file_size. The manifest file is an ever growing
|
|
1449
|
-
// file, but only the portion specified by manifest_file_size is valid for
|
|
1450
|
-
// this snapshot. Setting flush_memtable to true does Flush before recording
|
|
1451
|
-
// the live files. Setting flush_memtable to false is useful when we don't
|
|
1452
|
-
// want to wait for flush which may have to wait for compaction to complete
|
|
1453
|
-
// taking an indeterminate time.
|
|
1454
|
-
//
|
|
1455
|
-
// In case you have multiple column families, even if flush_memtable is true,
|
|
1456
|
-
// you still need to call GetSortedWalFiles after GetLiveFiles to compensate
|
|
1457
|
-
// for new data that arrived to already-flushed column families while other
|
|
1458
|
-
// column families were flushing
|
|
1459
|
-
virtual Status GetLiveFiles(std::vector<std::string>&,
|
|
1460
|
-
uint64_t* manifest_file_size,
|
|
1461
|
-
bool flush_memtable = true) = 0;
|
|
1462
|
-
|
|
1463
|
-
// Retrieve the sorted list of all wal files with earliest file first
|
|
1464
|
-
virtual Status GetSortedWalFiles(VectorLogPtr& files) = 0;
|
|
1465
|
-
|
|
1466
|
-
// Retrieve information about the current wal file
|
|
1467
|
-
//
|
|
1468
|
-
// Note that the log might have rolled after this call in which case
|
|
1469
|
-
// the current_log_file would not point to the current log file.
|
|
1470
|
-
//
|
|
1471
|
-
// Additionally, for the sake of optimization current_log_file->StartSequence
|
|
1472
|
-
// would always be set to 0
|
|
1473
|
-
virtual Status GetCurrentWalFile(
|
|
1474
|
-
std::unique_ptr<LogFile>* current_log_file) = 0;
|
|
1475
|
-
|
|
1476
1443
|
// Retrieves the creation time of the oldest file in the DB.
|
|
1477
1444
|
// This API only works if max_open_files = -1, if it is not then
|
|
1478
1445
|
// Status returned is Status::NotSupported()
|
|
@@ -1517,26 +1484,30 @@ class DB {
|
|
|
1517
1484
|
// path relative to the db directory. eg. 000001.sst, /archive/000003.log
|
|
1518
1485
|
virtual Status DeleteFile(std::string name) = 0;
|
|
1519
1486
|
|
|
1520
|
-
//
|
|
1521
|
-
//
|
|
1487
|
+
// Obtains a list of all live table (SST) files and how they fit into the
|
|
1488
|
+
// LSM-trees, such as column family, level, key range, etc.
|
|
1489
|
+
// This builds a de-normalized form of GetAllColumnFamilyMetaData().
|
|
1490
|
+
// For information about all files in a DB, use GetLiveFilesStorageInfo().
|
|
1522
1491
|
virtual void GetLiveFilesMetaData(
|
|
1523
1492
|
std::vector<LiveFileMetaData>* /*metadata*/) {}
|
|
1524
1493
|
|
|
1525
|
-
// Return a list of all table and blob files checksum info.
|
|
1494
|
+
// Return a list of all table (SST) and blob files checksum info.
|
|
1526
1495
|
// Note: This function might be of limited use because it cannot be
|
|
1527
|
-
// synchronized with
|
|
1496
|
+
// synchronized with other "live files" APIs. GetLiveFilesStorageInfo()
|
|
1497
|
+
// is recommended instead.
|
|
1528
1498
|
virtual Status GetLiveFilesChecksumInfo(FileChecksumList* checksum_list) = 0;
|
|
1529
1499
|
|
|
1530
|
-
// EXPERIMENTAL: This function is not yet feature-complete.
|
|
1531
1500
|
// Get information about all live files that make up a DB, for making
|
|
1532
1501
|
// live copies (Checkpoint, backups, etc.) or other storage-related purposes.
|
|
1533
|
-
//
|
|
1534
|
-
//
|
|
1502
|
+
// If creating a live copy, use DisableFileDeletions() before and
|
|
1503
|
+
// EnableFileDeletions() after to prevent deletions.
|
|
1504
|
+
// For LSM-tree metadata, use Get*MetaData() functions instead.
|
|
1535
1505
|
virtual Status GetLiveFilesStorageInfo(
|
|
1536
1506
|
const LiveFilesStorageInfoOptions& opts,
|
|
1537
1507
|
std::vector<LiveFileStorageInfo>* files) = 0;
|
|
1538
1508
|
|
|
1539
|
-
// Obtains the meta data of the specified column family of the DB
|
|
1509
|
+
// Obtains the LSM-tree meta data of the specified column family of the DB,
|
|
1510
|
+
// including metadata for each live table (SST) file in that column family.
|
|
1540
1511
|
virtual void GetColumnFamilyMetaData(ColumnFamilyHandle* /*column_family*/,
|
|
1541
1512
|
ColumnFamilyMetaData* /*metadata*/) {}
|
|
1542
1513
|
|
|
@@ -1545,12 +1516,43 @@ class DB {
|
|
|
1545
1516
|
GetColumnFamilyMetaData(DefaultColumnFamily(), metadata);
|
|
1546
1517
|
}
|
|
1547
1518
|
|
|
1548
|
-
// Obtains the meta data of all column families
|
|
1549
|
-
//
|
|
1550
|
-
// name of the column family.
|
|
1519
|
+
// Obtains the LSM-tree meta data of all column families of the DB,
|
|
1520
|
+
// including metadata for each live table (SST) file in the DB.
|
|
1551
1521
|
virtual void GetAllColumnFamilyMetaData(
|
|
1552
1522
|
std::vector<ColumnFamilyMetaData>* /*metadata*/) {}
|
|
1553
1523
|
|
|
1524
|
+
// Retrieve the list of all files in the database except WAL files. The files
|
|
1525
|
+
// are relative to the dbname (or db_paths/cf_paths), not absolute paths.
|
|
1526
|
+
// (Not recommended with db_paths/cf_paths because that information is not
|
|
1527
|
+
// returned.) Despite being relative paths, the file names begin with "/".
|
|
1528
|
+
// The valid size of the manifest file is returned in manifest_file_size.
|
|
1529
|
+
// The manifest file is an ever growing file, but only the portion specified
|
|
1530
|
+
// by manifest_file_size is valid for this snapshot. Setting flush_memtable
|
|
1531
|
+
// to true does Flush before recording the live files. Setting flush_memtable
|
|
1532
|
+
// to false is useful when we don't want to wait for flush which may have to
|
|
1533
|
+
// wait for compaction to complete taking an indeterminate time.
|
|
1534
|
+
//
|
|
1535
|
+
// NOTE: Although GetLiveFiles() followed by GetSortedWalFiles() can generate
|
|
1536
|
+
// a lossless backup, GetLiveFilesStorageInfo() is strongly recommended
|
|
1537
|
+
// instead, because it ensures a single consistent view of all files is
|
|
1538
|
+
// captured in one call.
|
|
1539
|
+
virtual Status GetLiveFiles(std::vector<std::string>&,
|
|
1540
|
+
uint64_t* manifest_file_size,
|
|
1541
|
+
bool flush_memtable = true) = 0;
|
|
1542
|
+
|
|
1543
|
+
// Retrieve the sorted list of all wal files with earliest file first
|
|
1544
|
+
virtual Status GetSortedWalFiles(VectorLogPtr& files) = 0;
|
|
1545
|
+
|
|
1546
|
+
// Retrieve information about the current wal file
|
|
1547
|
+
//
|
|
1548
|
+
// Note that the log might have rolled after this call in which case
|
|
1549
|
+
// the current_log_file would not point to the current log file.
|
|
1550
|
+
//
|
|
1551
|
+
// Additionally, for the sake of optimization current_log_file->StartSequence
|
|
1552
|
+
// would always be set to 0
|
|
1553
|
+
virtual Status GetCurrentWalFile(
|
|
1554
|
+
std::unique_ptr<LogFile>* current_log_file) = 0;
|
|
1555
|
+
|
|
1554
1556
|
// IngestExternalFile() will load a list of external SST files (1) into the DB
|
|
1555
1557
|
// Two primary modes are supported:
|
|
1556
1558
|
// - Duplicate keys in the new files will overwrite exiting keys (default)
|
|
@@ -796,7 +796,7 @@ class RandomAccessFile {
|
|
|
796
796
|
// should return after all reads have completed. The reads will be
|
|
797
797
|
// non-overlapping. If the function return Status is not ok, status of
|
|
798
798
|
// individual requests will be ignored and return status will be assumed
|
|
799
|
-
// for all read requests. The function return status is only meant for
|
|
799
|
+
// for all read requests. The function return status is only meant for
|
|
800
800
|
// any errors that occur before even processing specific read requests
|
|
801
801
|
virtual Status MultiRead(ReadRequest* reqs, size_t num_reqs) {
|
|
802
802
|
assert(reqs != nullptr);
|
|
@@ -53,6 +53,7 @@ struct ConfigOptions;
|
|
|
53
53
|
using AccessPattern = RandomAccessFile::AccessPattern;
|
|
54
54
|
using FileAttributes = Env::FileAttributes;
|
|
55
55
|
|
|
56
|
+
// DEPRECATED
|
|
56
57
|
// Priority of an IO request. This is a hint and does not guarantee any
|
|
57
58
|
// particular QoS.
|
|
58
59
|
// IO_LOW - Typically background reads/writes such as compaction/flush
|
|
@@ -86,6 +87,7 @@ struct IOOptions {
|
|
|
86
87
|
// Timeout for the operation in microseconds
|
|
87
88
|
std::chrono::microseconds timeout;
|
|
88
89
|
|
|
90
|
+
// DEPRECATED
|
|
89
91
|
// Priority - high or low
|
|
90
92
|
IOPriority prio;
|
|
91
93
|
|
|
@@ -81,10 +81,8 @@ struct IOStatsContext {
|
|
|
81
81
|
// If RocksDB is compiled with -DNIOSTATS_CONTEXT, then a pointer to a global,
|
|
82
82
|
// non-thread-local IOStatsContext object will be returned. Attempts to update
|
|
83
83
|
// this object will be ignored, and reading from it will also be no-op.
|
|
84
|
-
// Otherwise,
|
|
85
|
-
//
|
|
86
|
-
// a thread-local IOStatsContext object will be returned.
|
|
87
|
-
// b) if thread-local is NOT supported, then compilation will fail.
|
|
84
|
+
// Otherwise, a pointer to a thread-local IOStatsContext object will be
|
|
85
|
+
// returned.
|
|
88
86
|
//
|
|
89
87
|
// This function never returns nullptr.
|
|
90
88
|
IOStatsContext* get_iostats_context();
|
|
@@ -300,6 +300,9 @@ class MemTableRepFactory : public Customizable {
|
|
|
300
300
|
static Status CreateFromString(const ConfigOptions& config_options,
|
|
301
301
|
const std::string& id,
|
|
302
302
|
std::unique_ptr<MemTableRepFactory>* factory);
|
|
303
|
+
static Status CreateFromString(const ConfigOptions& config_options,
|
|
304
|
+
const std::string& id,
|
|
305
|
+
std::shared_ptr<MemTableRepFactory>* factory);
|
|
303
306
|
|
|
304
307
|
virtual MemTableRep* CreateMemTableRep(const MemTableRep::KeyComparator&,
|
|
305
308
|
Allocator*, const SliceTransform*,
|
|
@@ -492,6 +492,23 @@ struct DBOptions {
|
|
|
492
492
|
// Default: false
|
|
493
493
|
bool track_and_verify_wals_in_manifest = false;
|
|
494
494
|
|
|
495
|
+
// EXPERIMENTAL: This API/behavior is subject to change
|
|
496
|
+
// If true, during DB-open it verifies the SST unique id between MANIFEST
|
|
497
|
+
// and SST properties, which is to make sure the SST is not overwritten or
|
|
498
|
+
// misplaced. A corruption error will be reported if mismatch detected, but
|
|
499
|
+
// only when MANIFEST tracks the unique id, which starts from version 7.3.
|
|
500
|
+
// The unique id is an internal unique id and subject to change.
|
|
501
|
+
//
|
|
502
|
+
// Note:
|
|
503
|
+
// 1. if enabled, it opens every SST files during DB open to read the unique
|
|
504
|
+
// id from SST properties, so it's recommended to have `max_open_files=-1`
|
|
505
|
+
// to pre-open the SST files before the verification.
|
|
506
|
+
// 2. existing SST files won't have its unique_id tracked in MANIFEST, then
|
|
507
|
+
// verification will be skipped.
|
|
508
|
+
//
|
|
509
|
+
// Default: false
|
|
510
|
+
bool verify_sst_unique_id_in_manifest = false;
|
|
511
|
+
|
|
495
512
|
// Use the specified object to interact with the environment,
|
|
496
513
|
// e.g. to read/write files, schedule background work, etc. In the near
|
|
497
514
|
// future, support for doing storage operations such as read/write files
|
|
@@ -552,7 +569,7 @@ struct DBOptions {
|
|
|
552
569
|
// compaction. For universal-style compaction, you can usually set it to -1.
|
|
553
570
|
//
|
|
554
571
|
// A high value or -1 for this option can cause high memory usage.
|
|
555
|
-
// See BlockBasedTableOptions::
|
|
572
|
+
// See BlockBasedTableOptions::cache_usage_options to constrain
|
|
556
573
|
// memory usage in case of block based table format.
|
|
557
574
|
//
|
|
558
575
|
// Default: -1
|
|
@@ -767,6 +784,14 @@ struct DBOptions {
|
|
|
767
784
|
|
|
768
785
|
// Allow the OS to mmap file for reading sst tables.
|
|
769
786
|
// Not recommended for 32-bit OS.
|
|
787
|
+
// When the option is set to true and compression is disabled, the blocks
|
|
788
|
+
// will not be copied and will be read directly from the mmap-ed memory
|
|
789
|
+
// area, and the block will not be inserted into the block cache. However,
|
|
790
|
+
// checksums will still be checked if ReadOptions.verify_checksums is set
|
|
791
|
+
// to be true. It means a checksum check every time a block is read, more
|
|
792
|
+
// than the setup where the option is set to false and the block cache is
|
|
793
|
+
// used. The common use of the options is to run RocksDB on ramfs, where
|
|
794
|
+
// checksum verification is usually not needed.
|
|
770
795
|
// Default: false
|
|
771
796
|
bool allow_mmap_reads = false;
|
|
772
797
|
|
|
@@ -1142,8 +1167,7 @@ struct DBOptions {
|
|
|
1142
1167
|
#endif // ROCKSDB_LITE
|
|
1143
1168
|
|
|
1144
1169
|
// If true, then DB::Open / CreateColumnFamily / DropColumnFamily
|
|
1145
|
-
//
|
|
1146
|
-
// persisted.
|
|
1170
|
+
// SetOptions will fail if options file is not properly persisted.
|
|
1147
1171
|
//
|
|
1148
1172
|
// DEFAULT: false
|
|
1149
1173
|
bool fail_if_options_file_error = false;
|
|
@@ -1329,6 +1353,19 @@ struct DBOptions {
|
|
|
1329
1353
|
//
|
|
1330
1354
|
// Default: kNonVolatileBlockTier
|
|
1331
1355
|
CacheTier lowest_used_cache_tier = CacheTier::kNonVolatileBlockTier;
|
|
1356
|
+
|
|
1357
|
+
// If set to false, when compaction or flush sees a SingleDelete followed by
|
|
1358
|
+
// a Delete for the same user key, compaction job will not fail.
|
|
1359
|
+
// Otherwise, compaction job will fail.
|
|
1360
|
+
// This is a temporary option to help existing use cases migrate, and
|
|
1361
|
+
// will be removed in a future release.
|
|
1362
|
+
// Warning: do not set to false unless you are trying to migrate existing
|
|
1363
|
+
// data in which the contract of single delete
|
|
1364
|
+
// (https://github.com/facebook/rocksdb/wiki/Single-Delete) is not enforced,
|
|
1365
|
+
// thus has Delete mixed with SingleDelete for the same user key. Violation
|
|
1366
|
+
// of the contract leads to undefined behaviors with high possibility of data
|
|
1367
|
+
// inconsistency, e.g. deleted old data become visible again, etc.
|
|
1368
|
+
bool enforce_single_del_contracts = true;
|
|
1332
1369
|
};
|
|
1333
1370
|
|
|
1334
1371
|
// Options to control the behavior of a database (passed to DB::Open)
|
|
@@ -1952,6 +1989,11 @@ struct CompactionServiceOptionsOverride {
|
|
|
1952
1989
|
// returned to CompactionService primary host, to collect that, the user needs
|
|
1953
1990
|
// to set it here.
|
|
1954
1991
|
std::shared_ptr<Statistics> statistics = nullptr;
|
|
1992
|
+
|
|
1993
|
+
// Only compaction generated SST files use this user defined table properties
|
|
1994
|
+
// collector.
|
|
1995
|
+
std::vector<std::shared_ptr<TablePropertiesCollectorFactory>>
|
|
1996
|
+
table_properties_collector_factories;
|
|
1955
1997
|
};
|
|
1956
1998
|
|
|
1957
1999
|
struct OpenAndCompactOptions {
|
|
@@ -229,6 +229,8 @@ struct PerfContext {
|
|
|
229
229
|
// Time spent in decrypting data. Populated when EncryptedEnv is used.
|
|
230
230
|
uint64_t decrypt_data_nanos;
|
|
231
231
|
|
|
232
|
+
uint64_t number_async_seek;
|
|
233
|
+
|
|
232
234
|
std::map<uint32_t, PerfContextByLevel>* level_to_perf_context = nullptr;
|
|
233
235
|
bool per_level_perf_context_enabled = false;
|
|
234
236
|
};
|
|
@@ -19,9 +19,12 @@ class DB;
|
|
|
19
19
|
// To Destroy a Snapshot, call DB::ReleaseSnapshot(snapshot).
|
|
20
20
|
class Snapshot {
|
|
21
21
|
public:
|
|
22
|
-
// returns Snapshot's sequence number
|
|
23
22
|
virtual SequenceNumber GetSequenceNumber() const = 0;
|
|
24
23
|
|
|
24
|
+
// Returns unix time i.e. the number of seconds since the Epoch, 1970-01-01
|
|
25
|
+
// 00:00:00 (UTC).
|
|
26
|
+
virtual int64_t GetUnixTime() const = 0;
|
|
27
|
+
|
|
25
28
|
protected:
|
|
26
29
|
virtual ~Snapshot();
|
|
27
30
|
};
|