@nxtedition/rocksdb 8.1.7 → 8.1.8
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/deps/rocksdb/rocksdb/CMakeLists.txt +1 -6
- package/deps/rocksdb/rocksdb/Makefile +15 -49
- package/deps/rocksdb/rocksdb/TARGETS +2 -0
- package/deps/rocksdb/rocksdb/cache/cache.cc +1 -15
- package/deps/rocksdb/rocksdb/cache/cache_bench_tool.cc +1 -5
- package/deps/rocksdb/rocksdb/cache/cache_helpers.h +1 -1
- package/deps/rocksdb/rocksdb/cache/cache_key.cc +1 -1
- package/deps/rocksdb/rocksdb/cache/charged_cache.h +1 -1
- package/deps/rocksdb/rocksdb/cache/clock_cache.cc +1 -1
- package/deps/rocksdb/rocksdb/cache/compressed_secondary_cache.cc +11 -7
- package/deps/rocksdb/rocksdb/cache/compressed_secondary_cache.h +3 -1
- package/deps/rocksdb/rocksdb/cache/compressed_secondary_cache_test.cc +94 -6
- package/deps/rocksdb/rocksdb/cache/lru_cache_test.cc +0 -39
- package/deps/rocksdb/rocksdb/cache/sharded_cache.h +1 -1
- package/deps/rocksdb/rocksdb/cache/typed_cache.h +1 -1
- package/deps/rocksdb/rocksdb/db/blob/blob_contents.h +1 -1
- package/deps/rocksdb/rocksdb/db/blob/blob_file_completion_callback.h +0 -17
- package/deps/rocksdb/rocksdb/db/blob/blob_source.cc +0 -2
- package/deps/rocksdb/rocksdb/db/blob/blob_source_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/blob/db_blob_basic_test.cc +240 -8
- package/deps/rocksdb/rocksdb/db/blob/db_blob_compaction_test.cc +0 -14
- package/deps/rocksdb/rocksdb/db/blob/db_blob_corruption_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/blob/db_blob_index_test.cc +0 -6
- package/deps/rocksdb/rocksdb/db/builder.cc +0 -2
- package/deps/rocksdb/rocksdb/db/c.cc +8 -14
- package/deps/rocksdb/rocksdb/db/c_test.c +0 -11
- package/deps/rocksdb/rocksdb/db/column_family.cc +0 -13
- package/deps/rocksdb/rocksdb/db/column_family.h +0 -2
- package/deps/rocksdb/rocksdb/db/column_family_test.cc +0 -71
- package/deps/rocksdb/rocksdb/db/compact_files_test.cc +0 -11
- package/deps/rocksdb/rocksdb/db/compaction/compaction_iterator.cc +113 -43
- package/deps/rocksdb/rocksdb/db/compaction/compaction_job.cc +0 -20
- package/deps/rocksdb/rocksdb/db/compaction/compaction_job_stats_test.cc +0 -10
- package/deps/rocksdb/rocksdb/db/compaction/compaction_job_test.cc +0 -11
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker.cc +0 -2
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker.h +0 -6
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_fifo.cc +0 -2
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_fifo.h +0 -2
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_test.cc +0 -5
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_universal.cc +0 -2
- package/deps/rocksdb/rocksdb/db/compaction/compaction_picker_universal.h +0 -2
- package/deps/rocksdb/rocksdb/db/compaction/compaction_service_job.cc +0 -2
- package/deps/rocksdb/rocksdb/db/compaction/compaction_service_test.cc +0 -11
- package/deps/rocksdb/rocksdb/db/compaction/sst_partitioner.cc +1 -8
- package/deps/rocksdb/rocksdb/db/compaction/subcompaction_state.h +0 -2
- package/deps/rocksdb/rocksdb/db/compaction/tiered_compaction_test.cc +0 -8
- package/deps/rocksdb/rocksdb/db/convenience.cc +0 -2
- package/deps/rocksdb/rocksdb/db/corruption_test.cc +53 -56
- package/deps/rocksdb/rocksdb/db/cuckoo_table_db_test.cc +0 -10
- package/deps/rocksdb/rocksdb/db/db_basic_test.cc +33 -48
- package/deps/rocksdb/rocksdb/db/db_block_cache_test.cc +15 -358
- package/deps/rocksdb/rocksdb/db/db_bloom_filter_test.cc +0 -24
- package/deps/rocksdb/rocksdb/db/db_compaction_filter_test.cc +0 -6
- package/deps/rocksdb/rocksdb/db/db_compaction_test.cc +0 -8
- package/deps/rocksdb/rocksdb/db/db_dynamic_level_test.cc +0 -8
- package/deps/rocksdb/rocksdb/db/db_encryption_test.cc +0 -4
- package/deps/rocksdb/rocksdb/db/db_filesnapshot.cc +0 -2
- package/deps/rocksdb/rocksdb/db/db_flush_test.cc +0 -33
- package/deps/rocksdb/rocksdb/db/db_impl/compacted_db_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/db/db_impl/compacted_db_impl.h +0 -4
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl.cc +150 -102
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl.h +52 -48
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_compaction_flush.cc +0 -66
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_debug.cc +2 -2
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_experimental.cc +0 -2
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_files.cc +0 -6
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_open.cc +0 -16
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_readonly.cc +0 -17
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_readonly.h +0 -4
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_secondary.cc +0 -18
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_secondary.h +0 -4
- package/deps/rocksdb/rocksdb/db/db_impl/db_impl_write.cc +6 -9
- package/deps/rocksdb/rocksdb/db/db_io_failure_test.cc +0 -4
- package/deps/rocksdb/rocksdb/db/db_iter.cc +0 -4
- package/deps/rocksdb/rocksdb/db/db_iter.h +0 -6
- package/deps/rocksdb/rocksdb/db/db_iterator_test.cc +0 -12
- package/deps/rocksdb/rocksdb/db/db_log_iter_test.cc +0 -8
- package/deps/rocksdb/rocksdb/db/db_logical_block_size_cache_test.cc +0 -16
- package/deps/rocksdb/rocksdb/db/db_merge_operand_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/db_merge_operator_test.cc +5 -5
- package/deps/rocksdb/rocksdb/db/db_options_test.cc +0 -4
- package/deps/rocksdb/rocksdb/db/db_properties_test.cc +0 -6
- package/deps/rocksdb/rocksdb/db/db_range_del_test.cc +0 -10
- package/deps/rocksdb/rocksdb/db/db_rate_limiter_test.cc +0 -15
- package/deps/rocksdb/rocksdb/db/db_readonly_with_timestamp_test.cc +0 -4
- package/deps/rocksdb/rocksdb/db/db_secondary_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/db_sst_test.cc +0 -4
- package/deps/rocksdb/rocksdb/db/db_statistics_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/db_table_properties_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/db_tailing_iter_test.cc +0 -9
- package/deps/rocksdb/rocksdb/db/db_test.cc +2 -64
- package/deps/rocksdb/rocksdb/db/db_test2.cc +0 -138
- package/deps/rocksdb/rocksdb/db/db_test_util.cc +0 -33
- package/deps/rocksdb/rocksdb/db/db_test_util.h +11 -94
- package/deps/rocksdb/rocksdb/db/db_universal_compaction_test.cc +0 -8
- package/deps/rocksdb/rocksdb/db/db_wal_test.cc +18 -53
- package/deps/rocksdb/rocksdb/db/db_with_timestamp_basic_test.cc +0 -6
- package/deps/rocksdb/rocksdb/db/db_with_timestamp_compaction_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/db_write_buffer_manager_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/db_write_test.cc +115 -12
- package/deps/rocksdb/rocksdb/db/deletefile_test.cc +0 -11
- package/deps/rocksdb/rocksdb/db/error_handler.cc +0 -27
- package/deps/rocksdb/rocksdb/db/error_handler_fs_test.cc +0 -12
- package/deps/rocksdb/rocksdb/db/event_helpers.cc +1 -49
- package/deps/rocksdb/rocksdb/db/event_helpers.h +0 -4
- package/deps/rocksdb/rocksdb/db/experimental.cc +0 -14
- package/deps/rocksdb/rocksdb/db/external_sst_file_basic_test.cc +1 -2
- package/deps/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc +0 -2
- package/deps/rocksdb/rocksdb/db/external_sst_file_test.cc +16 -27
- package/deps/rocksdb/rocksdb/db/flush_job.cc +0 -6
- package/deps/rocksdb/rocksdb/db/flush_job.h +0 -4
- package/deps/rocksdb/rocksdb/db/flush_job_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/forward_iterator.cc +0 -2
- package/deps/rocksdb/rocksdb/db/forward_iterator.h +0 -2
- package/deps/rocksdb/rocksdb/db/forward_iterator_bench.cc +2 -2
- package/deps/rocksdb/rocksdb/db/import_column_family_job.cc +0 -2
- package/deps/rocksdb/rocksdb/db/import_column_family_test.cc +0 -12
- package/deps/rocksdb/rocksdb/db/internal_stats.cc +0 -8
- package/deps/rocksdb/rocksdb/db/internal_stats.h +0 -151
- package/deps/rocksdb/rocksdb/db/job_context.h +4 -5
- package/deps/rocksdb/rocksdb/db/listener_test.cc +19 -16
- package/deps/rocksdb/rocksdb/db/malloc_stats.cc +0 -2
- package/deps/rocksdb/rocksdb/db/malloc_stats.h +0 -2
- package/deps/rocksdb/rocksdb/db/memtable.cc +12 -10
- package/deps/rocksdb/rocksdb/db/memtable.h +0 -4
- package/deps/rocksdb/rocksdb/db/memtable_list.cc +0 -8
- package/deps/rocksdb/rocksdb/db/memtable_list_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/merge_helper.cc +6 -5
- package/deps/rocksdb/rocksdb/db/merge_test.cc +0 -8
- package/deps/rocksdb/rocksdb/db/obsolete_files_test.cc +0 -11
- package/deps/rocksdb/rocksdb/db/options_file_test.cc +0 -10
- package/deps/rocksdb/rocksdb/db/perf_context_test.cc +0 -4
- package/deps/rocksdb/rocksdb/db/periodic_task_scheduler.cc +0 -2
- package/deps/rocksdb/rocksdb/db/periodic_task_scheduler.h +0 -2
- package/deps/rocksdb/rocksdb/db/periodic_task_scheduler_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/plain_table_db_test.cc +0 -10
- package/deps/rocksdb/rocksdb/db/prefix_test.cc +0 -12
- package/deps/rocksdb/rocksdb/db/repair.cc +0 -2
- package/deps/rocksdb/rocksdb/db/repair_test.cc +0 -12
- package/deps/rocksdb/rocksdb/db/seqno_time_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/snapshot_checker.h +0 -2
- package/deps/rocksdb/rocksdb/db/table_cache.cc +0 -10
- package/deps/rocksdb/rocksdb/db/table_cache_sync_and_async.h +0 -4
- package/deps/rocksdb/rocksdb/db/table_properties_collector_test.cc +0 -4
- package/deps/rocksdb/rocksdb/db/transaction_log_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/db/transaction_log_impl.h +0 -2
- package/deps/rocksdb/rocksdb/db/version_edit.h +1 -1
- package/deps/rocksdb/rocksdb/db/version_set.cc +86 -47
- package/deps/rocksdb/rocksdb/db/version_set.h +10 -4
- package/deps/rocksdb/rocksdb/db/version_set_sync_and_async.h +31 -11
- package/deps/rocksdb/rocksdb/db/version_set_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/wal_manager.cc +0 -2
- package/deps/rocksdb/rocksdb/db/wal_manager.h +0 -2
- package/deps/rocksdb/rocksdb/db/wal_manager_test.cc +0 -10
- package/deps/rocksdb/rocksdb/db/wide/db_wide_basic_test.cc +388 -0
- package/deps/rocksdb/rocksdb/db/write_batch_test.cc +0 -2
- package/deps/rocksdb/rocksdb/db/write_callback_test.cc +0 -11
- package/deps/rocksdb/rocksdb/db/write_thread.cc +26 -0
- package/deps/rocksdb/rocksdb/db/write_thread.h +24 -0
- package/deps/rocksdb/rocksdb/db_stress_tool/cf_consistency_stress.cc +0 -6
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_common.h +1 -4
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_gflags.cc +6 -6
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_listener.cc +0 -2
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_listener.h +0 -2
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_test_base.cc +40 -131
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_test_base.h +2 -20
- package/deps/rocksdb/rocksdb/db_stress_tool/db_stress_tool.cc +0 -7
- package/deps/rocksdb/rocksdb/db_stress_tool/expected_state.cc +0 -12
- package/deps/rocksdb/rocksdb/db_stress_tool/multi_ops_txns_stress.cc +0 -61
- package/deps/rocksdb/rocksdb/db_stress_tool/multi_ops_txns_stress.h +0 -8
- package/deps/rocksdb/rocksdb/db_stress_tool/no_batched_ops_stress.cc +122 -54
- package/deps/rocksdb/rocksdb/env/composite_env.cc +0 -10
- package/deps/rocksdb/rocksdb/env/composite_env_wrapper.h +0 -2
- package/deps/rocksdb/rocksdb/env/env.cc +2 -33
- package/deps/rocksdb/rocksdb/env/env_basic_test.cc +0 -4
- package/deps/rocksdb/rocksdb/env/env_chroot.cc +2 -2
- package/deps/rocksdb/rocksdb/env/env_chroot.h +2 -2
- package/deps/rocksdb/rocksdb/env/env_encryption.cc +2 -7
- package/deps/rocksdb/rocksdb/env/env_encryption_ctr.h +0 -2
- package/deps/rocksdb/rocksdb/env/env_test.cc +2 -18
- package/deps/rocksdb/rocksdb/env/file_system.cc +1 -14
- package/deps/rocksdb/rocksdb/env/fs_posix.cc +0 -18
- package/deps/rocksdb/rocksdb/env/fs_readonly.h +0 -2
- package/deps/rocksdb/rocksdb/env/fs_remap.cc +0 -2
- package/deps/rocksdb/rocksdb/env/fs_remap.h +0 -2
- package/deps/rocksdb/rocksdb/env/mock_env.cc +0 -12
- package/deps/rocksdb/rocksdb/file/delete_scheduler.cc +0 -2
- package/deps/rocksdb/rocksdb/file/delete_scheduler.h +0 -2
- package/deps/rocksdb/rocksdb/file/delete_scheduler_test.cc +0 -7
- package/deps/rocksdb/rocksdb/file/file_prefetch_buffer.cc +3 -2
- package/deps/rocksdb/rocksdb/file/file_util.cc +0 -9
- package/deps/rocksdb/rocksdb/file/prefetch_test.cc +86 -99
- package/deps/rocksdb/rocksdb/file/random_access_file_reader.cc +0 -18
- package/deps/rocksdb/rocksdb/file/random_access_file_reader.h +0 -8
- package/deps/rocksdb/rocksdb/file/random_access_file_reader_test.cc +0 -2
- package/deps/rocksdb/rocksdb/file/sequence_file_reader.cc +0 -8
- package/deps/rocksdb/rocksdb/file/sequence_file_reader.h +0 -10
- package/deps/rocksdb/rocksdb/file/sst_file_manager_impl.cc +0 -18
- package/deps/rocksdb/rocksdb/file/sst_file_manager_impl.h +0 -2
- package/deps/rocksdb/rocksdb/file/writable_file_writer.cc +0 -36
- package/deps/rocksdb/rocksdb/file/writable_file_writer.h +0 -16
- package/deps/rocksdb/rocksdb/include/rocksdb/advanced_cache.h +527 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/advanced_options.h +1 -4
- package/deps/rocksdb/rocksdb/include/rocksdb/c.h +0 -4
- package/deps/rocksdb/rocksdb/include/rocksdb/cache.h +18 -432
- package/deps/rocksdb/rocksdb/include/rocksdb/compaction_filter.h +49 -3
- package/deps/rocksdb/rocksdb/include/rocksdb/configurable.h +0 -10
- package/deps/rocksdb/rocksdb/include/rocksdb/convenience.h +18 -77
- package/deps/rocksdb/rocksdb/include/rocksdb/customizable.h +0 -4
- package/deps/rocksdb/rocksdb/include/rocksdb/data_structure.h +154 -19
- package/deps/rocksdb/rocksdb/include/rocksdb/db.h +90 -37
- package/deps/rocksdb/rocksdb/include/rocksdb/db_dump_tool.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/env.h +1 -20
- package/deps/rocksdb/rocksdb/include/rocksdb/env_encryption.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/file_system.h +0 -8
- package/deps/rocksdb/rocksdb/include/rocksdb/ldb_tool.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/listener.h +0 -7
- package/deps/rocksdb/rocksdb/include/rocksdb/memtablerep.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/options.h +44 -60
- package/deps/rocksdb/rocksdb/include/rocksdb/port_defs.h +22 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/secondary_cache.h +1 -1
- package/deps/rocksdb/rocksdb/include/rocksdb/sst_dump_tool.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/sst_file_reader.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/sst_file_writer.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/statistics.h +17 -64
- package/deps/rocksdb/rocksdb/include/rocksdb/status.h +1 -0
- package/deps/rocksdb/rocksdb/include/rocksdb/system_clock.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/table.h +0 -13
- package/deps/rocksdb/rocksdb/include/rocksdb/thread_status.h +1 -1
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/backup_engine.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/cache_dump_load.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/customizable_util.h +4 -59
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/db_ttl.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/debug.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/env_mirror.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/ldb_cmd.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/memory_util.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/object_registry.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/optimistic_transaction_db.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/options_util.h +5 -29
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/replayer.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/sim_cache.h +4 -7
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/stackable_db.h +18 -4
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/table_properties_collectors.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/transaction.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/transaction_db.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/transaction_db_mutex.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/utilities/write_batch_with_index.h +0 -2
- package/deps/rocksdb/rocksdb/include/rocksdb/version.h +3 -3
- package/deps/rocksdb/rocksdb/logging/auto_roll_logger.cc +0 -4
- package/deps/rocksdb/rocksdb/logging/auto_roll_logger.h +0 -2
- package/deps/rocksdb/rocksdb/logging/auto_roll_logger_test.cc +0 -11
- package/deps/rocksdb/rocksdb/memory/jemalloc_nodump_allocator.cc +0 -2
- package/deps/rocksdb/rocksdb/memory/memory_allocator.cc +0 -11
- package/deps/rocksdb/rocksdb/memory/memory_allocator_test.cc +0 -4
- package/deps/rocksdb/rocksdb/memtable/hash_linklist_rep.cc +0 -2
- package/deps/rocksdb/rocksdb/memtable/hash_skiplist_rep.cc +0 -2
- package/deps/rocksdb/rocksdb/memtable/memtablerep_bench.cc +0 -2
- package/deps/rocksdb/rocksdb/memtable/skiplistrep.cc +0 -2
- package/deps/rocksdb/rocksdb/memtable/vectorrep.cc +0 -2
- package/deps/rocksdb/rocksdb/memtable/write_buffer_manager.cc +0 -12
- package/deps/rocksdb/rocksdb/memtable/write_buffer_manager_test.cc +1 -2
- package/deps/rocksdb/rocksdb/monitoring/statistics.cc +1 -36
- package/deps/rocksdb/rocksdb/monitoring/statistics_test.cc +0 -4
- package/deps/rocksdb/rocksdb/monitoring/stats_history_test.cc +0 -2
- package/deps/rocksdb/rocksdb/options/cf_options.cc +1 -4
- package/deps/rocksdb/rocksdb/options/cf_options.h +0 -2
- package/deps/rocksdb/rocksdb/options/configurable.cc +0 -55
- package/deps/rocksdb/rocksdb/options/configurable_helper.h +0 -2
- package/deps/rocksdb/rocksdb/options/configurable_test.cc +0 -20
- package/deps/rocksdb/rocksdb/options/configurable_test.h +0 -10
- package/deps/rocksdb/rocksdb/options/customizable.cc +0 -6
- package/deps/rocksdb/rocksdb/options/customizable_test.cc +21 -161
- package/deps/rocksdb/rocksdb/options/db_options.cc +1 -8
- package/deps/rocksdb/rocksdb/options/db_options.h +0 -4
- package/deps/rocksdb/rocksdb/options/options.cc +0 -2
- package/deps/rocksdb/rocksdb/options/options_helper.cc +0 -58
- package/deps/rocksdb/rocksdb/options/options_helper.h +0 -6
- package/deps/rocksdb/rocksdb/options/options_parser.cc +0 -2
- package/deps/rocksdb/rocksdb/options/options_parser.h +0 -2
- package/deps/rocksdb/rocksdb/options/options_settable_test.cc +14 -8
- package/deps/rocksdb/rocksdb/options/options_test.cc +260 -298
- package/deps/rocksdb/rocksdb/port/port_posix.h +1 -1
- package/deps/rocksdb/rocksdb/port/stack_trace.cc +87 -6
- package/deps/rocksdb/rocksdb/port/win/env_win.h +2 -2
- package/deps/rocksdb/rocksdb/port/win/port_win.h +11 -10
- package/deps/rocksdb/rocksdb/src.mk +1 -0
- package/deps/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.cc +0 -2
- package/deps/rocksdb/rocksdb/table/adaptive/adaptive_table_factory.h +0 -2
- package/deps/rocksdb/rocksdb/table/block_based/block.h +1 -0
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_builder.cc +2 -49
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_factory.cc +4 -103
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_factory.h +0 -2
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader.cc +20 -107
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader.h +2 -6
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_sync_and_async.h +1 -4
- package/deps/rocksdb/rocksdb/table/block_based/block_based_table_reader_test.cc +1 -12
- package/deps/rocksdb/rocksdb/table/block_based/block_cache.h +0 -4
- package/deps/rocksdb/rocksdb/table/block_based/cachable_entry.h +1 -1
- package/deps/rocksdb/rocksdb/table/block_based/data_block_hash_index.h +1 -0
- package/deps/rocksdb/rocksdb/table/block_based/filter_policy.cc +0 -7
- package/deps/rocksdb/rocksdb/table/block_based/flush_block_policy.cc +8 -22
- package/deps/rocksdb/rocksdb/table/block_based/partitioned_index_reader.cc +5 -0
- package/deps/rocksdb/rocksdb/table/block_based/reader_common.h +1 -8
- package/deps/rocksdb/rocksdb/table/block_fetcher_test.cc +0 -2
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_builder.cc +0 -2
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_builder.h +0 -2
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_builder_test.cc +0 -10
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_factory.cc +0 -4
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_factory.h +0 -2
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_reader.cc +0 -2
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_reader.h +0 -2
- package/deps/rocksdb/rocksdb/table/cuckoo/cuckoo_table_reader_test.cc +0 -10
- package/deps/rocksdb/rocksdb/table/format.cc +0 -6
- package/deps/rocksdb/rocksdb/table/get_context.cc +22 -21
- package/deps/rocksdb/rocksdb/table/get_context.h +15 -1
- package/deps/rocksdb/rocksdb/table/multiget_context.h +6 -3
- package/deps/rocksdb/rocksdb/table/plain/plain_table_builder.cc +0 -2
- package/deps/rocksdb/rocksdb/table/plain/plain_table_builder.h +0 -2
- package/deps/rocksdb/rocksdb/table/plain/plain_table_factory.cc +0 -54
- package/deps/rocksdb/rocksdb/table/plain/plain_table_factory.h +0 -2
- package/deps/rocksdb/rocksdb/table/plain/plain_table_index.cc +0 -2
- package/deps/rocksdb/rocksdb/table/plain/plain_table_index.h +0 -2
- package/deps/rocksdb/rocksdb/table/plain/plain_table_key_coding.cc +0 -2
- package/deps/rocksdb/rocksdb/table/plain/plain_table_key_coding.h +0 -2
- package/deps/rocksdb/rocksdb/table/plain/plain_table_reader.cc +0 -2
- package/deps/rocksdb/rocksdb/table/plain/plain_table_reader.h +0 -2
- package/deps/rocksdb/rocksdb/table/sst_file_dumper.cc +0 -2
- package/deps/rocksdb/rocksdb/table/sst_file_dumper.h +0 -2
- package/deps/rocksdb/rocksdb/table/sst_file_reader.cc +0 -2
- package/deps/rocksdb/rocksdb/table/sst_file_reader_test.cc +0 -11
- package/deps/rocksdb/rocksdb/table/sst_file_writer.cc +0 -2
- package/deps/rocksdb/rocksdb/table/table_factory.cc +1 -14
- package/deps/rocksdb/rocksdb/table/table_reader_bench.cc +0 -10
- package/deps/rocksdb/rocksdb/table/table_test.cc +2 -17
- package/deps/rocksdb/rocksdb/test_util/testutil.cc +0 -16
- package/deps/rocksdb/rocksdb/test_util/testutil.h +0 -2
- package/deps/rocksdb/rocksdb/test_util/transaction_test_util.cc +0 -2
- package/deps/rocksdb/rocksdb/test_util/transaction_test_util.h +0 -2
- package/deps/rocksdb/rocksdb/tools/blob_dump.cc +0 -8
- package/deps/rocksdb/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.cc +0 -2
- package/deps/rocksdb/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer_test.cc +0 -9
- package/deps/rocksdb/rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer_tool.cc +0 -8
- package/deps/rocksdb/rocksdb/tools/db_bench_tool.cc +5 -131
- package/deps/rocksdb/rocksdb/tools/db_bench_tool_test.cc +12 -4
- package/deps/rocksdb/rocksdb/tools/db_repl_stress.cc +0 -8
- package/deps/rocksdb/rocksdb/tools/db_sanity_test.cc +0 -4
- package/deps/rocksdb/rocksdb/tools/dump/db_dump_tool.cc +0 -2
- package/deps/rocksdb/rocksdb/tools/dump/rocksdb_dump.cc +2 -5
- package/deps/rocksdb/rocksdb/tools/dump/rocksdb_undump.cc +2 -5
- package/deps/rocksdb/rocksdb/tools/io_tracer_parser.cc +0 -8
- package/deps/rocksdb/rocksdb/tools/io_tracer_parser_test.cc +0 -8
- package/deps/rocksdb/rocksdb/tools/io_tracer_parser_tool.cc +0 -2
- package/deps/rocksdb/rocksdb/tools/io_tracer_parser_tool.h +0 -2
- package/deps/rocksdb/rocksdb/tools/ldb.cc +0 -8
- package/deps/rocksdb/rocksdb/tools/ldb_cmd.cc +0 -2
- package/deps/rocksdb/rocksdb/tools/ldb_cmd_test.cc +0 -10
- package/deps/rocksdb/rocksdb/tools/ldb_tool.cc +0 -2
- package/deps/rocksdb/rocksdb/tools/reduce_levels_test.cc +0 -10
- package/deps/rocksdb/rocksdb/tools/simulated_hybrid_file_system.cc +0 -2
- package/deps/rocksdb/rocksdb/tools/simulated_hybrid_file_system.h +0 -2
- package/deps/rocksdb/rocksdb/tools/sst_dump.cc +0 -8
- package/deps/rocksdb/rocksdb/tools/sst_dump_test.cc +0 -10
- package/deps/rocksdb/rocksdb/tools/sst_dump_tool.cc +0 -2
- package/deps/rocksdb/rocksdb/tools/trace_analyzer.cc +0 -8
- package/deps/rocksdb/rocksdb/tools/trace_analyzer_test.cc +1 -11
- package/deps/rocksdb/rocksdb/tools/trace_analyzer_tool.cc +6 -2
- package/deps/rocksdb/rocksdb/tools/trace_analyzer_tool.h +6 -3
- package/deps/rocksdb/rocksdb/tools/write_stress.cc +0 -4
- package/deps/rocksdb/rocksdb/util/aligned_buffer.h +1 -0
- package/deps/rocksdb/rocksdb/util/autovector.h +0 -13
- package/deps/rocksdb/rocksdb/util/autovector_test.cc +0 -7
- package/deps/rocksdb/rocksdb/util/build_version.cc.in +0 -2
- package/deps/rocksdb/rocksdb/util/compaction_job_stats_impl.cc +0 -8
- package/deps/rocksdb/rocksdb/util/comparator.cc +0 -8
- package/deps/rocksdb/rocksdb/util/core_local.h +1 -0
- package/deps/rocksdb/rocksdb/util/data_structure.cc +18 -0
- package/deps/rocksdb/rocksdb/util/distributed_mutex.h +2 -0
- package/deps/rocksdb/rocksdb/util/duplicate_detector.h +0 -2
- package/deps/rocksdb/rocksdb/util/file_checksum_helper.cc +1 -6
- package/deps/rocksdb/rocksdb/util/file_checksum_helper.h +1 -0
- package/deps/rocksdb/rocksdb/util/file_reader_writer_test.cc +0 -8
- package/deps/rocksdb/rocksdb/util/filter_bench.cc +3 -3
- package/deps/rocksdb/rocksdb/util/mutexlock.h +1 -0
- package/deps/rocksdb/rocksdb/util/random.cc +1 -0
- package/deps/rocksdb/rocksdb/util/slice.cc +0 -38
- package/deps/rocksdb/rocksdb/util/slice_test.cc +63 -2
- package/deps/rocksdb/rocksdb/util/status.cc +4 -3
- package/deps/rocksdb/rocksdb/util/string_util.cc +0 -2
- package/deps/rocksdb/rocksdb/util/string_util.h +1 -2
- package/deps/rocksdb/rocksdb/util/thread_local_test.cc +0 -4
- package/deps/rocksdb/rocksdb/utilities/backup/backup_engine.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/backup/backup_engine_impl.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/backup/backup_engine_test.cc +3 -3
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_compaction_filter.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_compaction_filter.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_gc_stats.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_impl.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_impl_filesnapshot.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_iterator.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_listener.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_db_test.cc +0 -10
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_dump_tool.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_dump_tool.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_file.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/blob_db/blob_file.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/cache_dump_load.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/cache_dump_load_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/cache_dump_load_impl.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/cassandra/cassandra_compaction_filter.cc +0 -4
- package/deps/rocksdb/rocksdb/utilities/cassandra/cassandra_functional_test.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/cassandra/cassandra_options.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/cassandra/merge_operator.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/checkpoint/checkpoint_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/checkpoint/checkpoint_impl.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/checkpoint/checkpoint_test.cc +24 -10
- package/deps/rocksdb/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/compaction_filters.cc +4 -8
- package/deps/rocksdb/rocksdb/utilities/debug.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/env_mirror.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/env_mirror_test.cc +0 -10
- package/deps/rocksdb/rocksdb/utilities/env_timed.cc +0 -6
- package/deps/rocksdb/rocksdb/utilities/env_timed.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/env_timed_test.cc +0 -10
- package/deps/rocksdb/rocksdb/utilities/leveldb_options/leveldb_options.cc +1 -1
- package/deps/rocksdb/rocksdb/utilities/memory/memory_test.cc +0 -10
- package/deps/rocksdb/rocksdb/utilities/memory/memory_util.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/merge_operators/max.cc +38 -54
- package/deps/rocksdb/rocksdb/utilities/merge_operators/max_operator.h +35 -0
- package/deps/rocksdb/rocksdb/utilities/merge_operators/put.cc +41 -59
- package/deps/rocksdb/rocksdb/utilities/merge_operators/put_operator.h +56 -0
- package/deps/rocksdb/rocksdb/utilities/merge_operators/string_append/stringappend.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/merge_operators/string_append/stringappend2.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/merge_operators/string_append/stringappend_test.cc +0 -4
- package/deps/rocksdb/rocksdb/utilities/merge_operators/uint64add.cc +29 -48
- package/deps/rocksdb/rocksdb/utilities/merge_operators/uint64add.h +35 -0
- package/deps/rocksdb/rocksdb/utilities/merge_operators.cc +35 -40
- package/deps/rocksdb/rocksdb/utilities/object_registry.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/object_registry_test.cc +0 -10
- package/deps/rocksdb/rocksdb/utilities/option_change_migration/option_change_migration.cc +0 -10
- package/deps/rocksdb/rocksdb/utilities/option_change_migration/option_change_migration_test.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/options/options_util.cc +0 -42
- package/deps/rocksdb/rocksdb/utilities/options/options_util_test.cc +25 -37
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_file.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_file.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/block_cache_tier_metadata.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/hash_table.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/hash_table_bench.cc +1 -1
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/hash_table_evictable.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/hash_table_test.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/lrulist.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_bench.cc +0 -4
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_test.cc +2 -51
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_test.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_tier.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/persistent_cache_tier.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/persistent_cache/volatile_tier_impl.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/simulator_cache/sim_cache.cc +26 -25
- package/deps/rocksdb/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.cc +1 -7
- package/deps/rocksdb/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector_test.cc +0 -7
- package/deps/rocksdb/rocksdb/utilities/trace/replayer_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/trace/replayer_impl.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/lock_manager.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/lock_manager.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/lock_tracker.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_manager.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_manager.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_manager_test.cc +0 -11
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_tracker.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/point/point_lock_tracker.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_lock_manager.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_locking_test.cc +0 -11
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/concurrent_tree.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/keyrange.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/locktree.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/manager.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/range_buffer.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/treenode.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/txnid_set.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/locktree/wfg.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/standalone_port.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/dbt.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/util/memarena.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/range_tree_lock_tracker.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/optimistic_transaction.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/optimistic_transaction.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/optimistic_transaction_db_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/optimistic_transaction_db_impl.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/optimistic_transaction_test.cc +0 -12
- package/deps/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction_db.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/pessimistic_transaction_db.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/snapshot_checker.cc +0 -16
- package/deps/rocksdb/rocksdb/utilities/transactions/timestamped_snapshot_test.cc +0 -9
- package/deps/rocksdb/rocksdb/utilities/transactions/transaction_base.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/transaction_base.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/transaction_db_mutex_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/transaction_db_mutex_impl.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/transaction_test.cc +102 -11
- package/deps/rocksdb/rocksdb/utilities/transactions/transaction_util.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/transaction_util.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/write_committed_transaction_ts_test.cc +0 -10
- package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_transaction_test.cc +0 -11
- package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/write_prepared_txn_db.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_transaction_test.cc +0 -11
- package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn_db.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/transactions/write_unprepared_txn_db.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/ttl/db_ttl_impl.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/ttl/db_ttl_impl.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/ttl/ttl_test.cc +0 -10
- package/deps/rocksdb/rocksdb/utilities/wal_filter.cc +1 -2
- package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index.cc +2 -3
- package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.cc +0 -2
- package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_internal.h +0 -2
- package/deps/rocksdb/rocksdb/utilities/write_batch_with_index/write_batch_with_index_test.cc +0 -10
- package/package.json +1 -1
- package/{deps/rocksdb/rocksdb/prebuilds → prebuilds}/linux-x64/node.napi.node +0 -0
|
@@ -7,26 +7,22 @@
|
|
|
7
7
|
// Use of this source code is governed by a BSD-style license that can be
|
|
8
8
|
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
9
9
|
//
|
|
10
|
-
// Various APIs for creating and
|
|
10
|
+
// Various APIs for configuring, creating, and monitoring read caches.
|
|
11
11
|
|
|
12
12
|
#pragma once
|
|
13
13
|
|
|
14
14
|
#include <cstdint>
|
|
15
|
-
#include <functional>
|
|
16
15
|
#include <memory>
|
|
17
16
|
#include <string>
|
|
18
17
|
|
|
19
18
|
#include "rocksdb/compression_type.h"
|
|
19
|
+
#include "rocksdb/data_structure.h"
|
|
20
20
|
#include "rocksdb/memory_allocator.h"
|
|
21
|
-
#include "rocksdb/slice.h"
|
|
22
|
-
#include "rocksdb/statistics.h"
|
|
23
|
-
#include "rocksdb/status.h"
|
|
24
21
|
|
|
25
22
|
namespace ROCKSDB_NAMESPACE {
|
|
26
23
|
|
|
27
|
-
class Cache;
|
|
24
|
+
class Cache; // defined in advanced_cache.h
|
|
28
25
|
struct ConfigOptions;
|
|
29
|
-
class Logger;
|
|
30
26
|
class SecondaryCache;
|
|
31
27
|
|
|
32
28
|
// Classifications of block cache entries.
|
|
@@ -75,6 +71,9 @@ constexpr uint32_t kNumCacheEntryRoles =
|
|
|
75
71
|
// Obtain a hyphen-separated, lowercase name of a `CacheEntryRole`.
|
|
76
72
|
const std::string& GetCacheEntryRoleName(CacheEntryRole);
|
|
77
73
|
|
|
74
|
+
// A fast bit set for CacheEntryRoles
|
|
75
|
+
using CacheEntryRoleSet = SmallEnumSet<CacheEntryRole, CacheEntryRole::kMisc>;
|
|
76
|
+
|
|
78
77
|
// For use with `GetMapProperty()` for property
|
|
79
78
|
// `DB::Properties::kBlockCacheEntryStats`. On success, the map will
|
|
80
79
|
// be populated with all keys that can be obtained from these functions.
|
|
@@ -240,6 +239,10 @@ struct CompressedSecondaryCacheOptions : LRUCacheOptions {
|
|
|
240
239
|
// into chunks so that they may better fit jemalloc bins.
|
|
241
240
|
bool enable_custom_split_merge = false;
|
|
242
241
|
|
|
242
|
+
// Kinds of entries that should not be compressed, but can be stored.
|
|
243
|
+
// (Filter blocks are essentially non-compressible but others usually are.)
|
|
244
|
+
CacheEntryRoleSet do_not_compress_roles = {CacheEntryRole::kFilterBlock};
|
|
245
|
+
|
|
243
246
|
CompressedSecondaryCacheOptions() {}
|
|
244
247
|
CompressedSecondaryCacheOptions(
|
|
245
248
|
size_t _capacity, int _num_shard_bits, bool _strict_capacity_limit,
|
|
@@ -250,14 +253,17 @@ struct CompressedSecondaryCacheOptions : LRUCacheOptions {
|
|
|
250
253
|
kDefaultCacheMetadataChargePolicy,
|
|
251
254
|
CompressionType _compression_type = CompressionType::kLZ4Compression,
|
|
252
255
|
uint32_t _compress_format_version = 2,
|
|
253
|
-
bool _enable_custom_split_merge = false
|
|
256
|
+
bool _enable_custom_split_merge = false,
|
|
257
|
+
const CacheEntryRoleSet& _do_not_compress_roles =
|
|
258
|
+
{CacheEntryRole::kFilterBlock})
|
|
254
259
|
: LRUCacheOptions(_capacity, _num_shard_bits, _strict_capacity_limit,
|
|
255
260
|
_high_pri_pool_ratio, std::move(_memory_allocator),
|
|
256
261
|
_use_adaptive_mutex, _metadata_charge_policy,
|
|
257
262
|
_low_pri_pool_ratio),
|
|
258
263
|
compression_type(_compression_type),
|
|
259
264
|
compress_format_version(_compress_format_version),
|
|
260
|
-
enable_custom_split_merge(_enable_custom_split_merge)
|
|
265
|
+
enable_custom_split_merge(_enable_custom_split_merge),
|
|
266
|
+
do_not_compress_roles(_do_not_compress_roles) {}
|
|
261
267
|
};
|
|
262
268
|
|
|
263
269
|
// EXPERIMENTAL
|
|
@@ -272,7 +278,9 @@ extern std::shared_ptr<SecondaryCache> NewCompressedSecondaryCache(
|
|
|
272
278
|
kDefaultCacheMetadataChargePolicy,
|
|
273
279
|
CompressionType compression_type = CompressionType::kLZ4Compression,
|
|
274
280
|
uint32_t compress_format_version = 2,
|
|
275
|
-
bool enable_custom_split_merge = false
|
|
281
|
+
bool enable_custom_split_merge = false,
|
|
282
|
+
const CacheEntryRoleSet& _do_not_compress_roles = {
|
|
283
|
+
CacheEntryRole::kFilterBlock});
|
|
276
284
|
|
|
277
285
|
extern std::shared_ptr<SecondaryCache> NewCompressedSecondaryCache(
|
|
278
286
|
const CompressedSecondaryCacheOptions& opts);
|
|
@@ -352,426 +360,4 @@ extern std::shared_ptr<Cache> NewClockCache(
|
|
|
352
360
|
CacheMetadataChargePolicy metadata_charge_policy =
|
|
353
361
|
kDefaultCacheMetadataChargePolicy);
|
|
354
362
|
|
|
355
|
-
// A Cache maps keys to objects resident in memory, tracks reference counts
|
|
356
|
-
// on those key-object entries, and is able to remove unreferenced entries
|
|
357
|
-
// whenever it wants. All operations are fully thread safe except as noted.
|
|
358
|
-
// Inserted entries have a specified "charge" which is some quantity in
|
|
359
|
-
// unspecified units, typically bytes of memory used. A Cache will typically
|
|
360
|
-
// have a finite capacity in units of charge, and evict entries as needed
|
|
361
|
-
// to stay at or below that capacity.
|
|
362
|
-
//
|
|
363
|
-
// NOTE: This API is for expert use only and is more intended for providing
|
|
364
|
-
// custom implementations than for calling into. It is subject to change
|
|
365
|
-
// as RocksDB evolves, especially the RocksDB block cache.
|
|
366
|
-
//
|
|
367
|
-
// INTERNAL: See typed_cache.h for convenient wrappers on top of this API.
|
|
368
|
-
class Cache {
|
|
369
|
-
public: // types hidden from API client
|
|
370
|
-
// Opaque handle to an entry stored in the cache.
|
|
371
|
-
struct Handle {};
|
|
372
|
-
|
|
373
|
-
public: // types hidden from Cache implementation
|
|
374
|
-
// Pointer to cached object of unspecified type. (This type alias is
|
|
375
|
-
// provided for clarity, not really for type checking.)
|
|
376
|
-
using ObjectPtr = void*;
|
|
377
|
-
|
|
378
|
-
// Opaque object providing context (settings, etc.) to create objects
|
|
379
|
-
// for primary cache from saved (serialized) secondary cache entries.
|
|
380
|
-
struct CreateContext {};
|
|
381
|
-
|
|
382
|
-
public: // type defs
|
|
383
|
-
// Depending on implementation, cache entries with higher priority levels
|
|
384
|
-
// could be less likely to get evicted than entries with lower priority
|
|
385
|
-
// levels. The "high" priority level applies to certain SST metablocks (e.g.
|
|
386
|
-
// index and filter blocks) if the option
|
|
387
|
-
// cache_index_and_filter_blocks_with_high_priority is set. The "low" priority
|
|
388
|
-
// level is used for other kinds of SST blocks (most importantly, data
|
|
389
|
-
// blocks), as well as the above metablocks in case
|
|
390
|
-
// cache_index_and_filter_blocks_with_high_priority is
|
|
391
|
-
// not set. The "bottom" priority level is for BlobDB's blob values.
|
|
392
|
-
enum class Priority { HIGH, LOW, BOTTOM };
|
|
393
|
-
|
|
394
|
-
// A set of callbacks to allow objects in the primary block cache to be
|
|
395
|
-
// be persisted in a secondary cache. The purpose of the secondary cache
|
|
396
|
-
// is to support other ways of caching the object, such as persistent or
|
|
397
|
-
// compressed data, that may require the object to be parsed and transformed
|
|
398
|
-
// in some way. Since the primary cache holds C++ objects and the secondary
|
|
399
|
-
// cache may only hold flat data that doesn't need relocation, these
|
|
400
|
-
// callbacks need to be provided by the user of the block
|
|
401
|
-
// cache to do the conversion.
|
|
402
|
-
// The CacheItemHelper is passed to Insert() and Lookup(). It has pointers
|
|
403
|
-
// to callback functions for size, saving and deletion of the
|
|
404
|
-
// object. The callbacks are defined in C-style in order to make them
|
|
405
|
-
// stateless and not add to the cache metadata size.
|
|
406
|
-
// Saving multiple std::function objects will take up 32 bytes per
|
|
407
|
-
// function, even if its not bound to an object and does no capture.
|
|
408
|
-
//
|
|
409
|
-
// All the callbacks are C-style function pointers in order to simplify
|
|
410
|
-
// lifecycle management. Objects in the cache can outlive the parent DB,
|
|
411
|
-
// so anything required for these operations should be contained in the
|
|
412
|
-
// object itself.
|
|
413
|
-
//
|
|
414
|
-
// The SizeCallback takes a pointer to the object and returns the size
|
|
415
|
-
// of the persistable data. It can be used by the secondary cache to allocate
|
|
416
|
-
// memory if needed.
|
|
417
|
-
//
|
|
418
|
-
// RocksDB callbacks are NOT exception-safe. A callback completing with an
|
|
419
|
-
// exception can lead to undefined behavior in RocksDB, including data loss,
|
|
420
|
-
// unreported corruption, deadlocks, and more.
|
|
421
|
-
using SizeCallback = size_t (*)(ObjectPtr obj);
|
|
422
|
-
|
|
423
|
-
// The SaveToCallback takes an object pointer and saves the persistable
|
|
424
|
-
// data into a buffer. The secondary cache may decide to not store it in a
|
|
425
|
-
// contiguous buffer, in which case this callback will be called multiple
|
|
426
|
-
// times with increasing offset
|
|
427
|
-
using SaveToCallback = Status (*)(ObjectPtr from_obj, size_t from_offset,
|
|
428
|
-
size_t length, char* out_buf);
|
|
429
|
-
|
|
430
|
-
// A function pointer type for destruction of a cache object. This will
|
|
431
|
-
// typically call the destructor for the appropriate type of the object.
|
|
432
|
-
// The Cache is responsible for copying and reclaiming space for the key,
|
|
433
|
-
// but objects are managed in part using this callback. Generally a DeleterFn
|
|
434
|
-
// can be nullptr if the ObjectPtr does not need destruction (e.g. nullptr or
|
|
435
|
-
// pointer into static data).
|
|
436
|
-
using DeleterFn = void (*)(ObjectPtr obj, MemoryAllocator* allocator);
|
|
437
|
-
|
|
438
|
-
// The CreateCallback is takes in a buffer from the NVM cache and constructs
|
|
439
|
-
// an object using it. The callback doesn't have ownership of the buffer and
|
|
440
|
-
// should copy the contents into its own buffer. The CreateContext* is
|
|
441
|
-
// provided by Lookup and may be used to follow DB- or CF-specific settings.
|
|
442
|
-
// In case of some error, non-OK is returned and the caller should ignore
|
|
443
|
-
// any result in out_obj. (The implementation must clean up after itself.)
|
|
444
|
-
using CreateCallback = Status (*)(const Slice& data, CreateContext* context,
|
|
445
|
-
MemoryAllocator* allocator,
|
|
446
|
-
ObjectPtr* out_obj, size_t* out_charge);
|
|
447
|
-
|
|
448
|
-
// A struct with pointers to helper functions for spilling items from the
|
|
449
|
-
// cache into the secondary cache. May be extended in the future. An
|
|
450
|
-
// instance of this struct is expected to outlive the cache.
|
|
451
|
-
struct CacheItemHelper {
|
|
452
|
-
// Function for deleting an object on its removal from the Cache.
|
|
453
|
-
// nullptr is only for entries that require no destruction, such as
|
|
454
|
-
// "placeholder" cache entries with nullptr object.
|
|
455
|
-
DeleterFn del_cb; // (<- Most performance critical)
|
|
456
|
-
// Next three are used for persisting values as described above.
|
|
457
|
-
// If any is nullptr, then all three should be nullptr and persisting the
|
|
458
|
-
// entry to/from secondary cache is not supported.
|
|
459
|
-
SizeCallback size_cb;
|
|
460
|
-
SaveToCallback saveto_cb;
|
|
461
|
-
CreateCallback create_cb;
|
|
462
|
-
// Classification of the entry for monitoring purposes in block cache.
|
|
463
|
-
CacheEntryRole role;
|
|
464
|
-
|
|
465
|
-
constexpr CacheItemHelper()
|
|
466
|
-
: del_cb(nullptr),
|
|
467
|
-
size_cb(nullptr),
|
|
468
|
-
saveto_cb(nullptr),
|
|
469
|
-
create_cb(nullptr),
|
|
470
|
-
role(CacheEntryRole::kMisc) {}
|
|
471
|
-
|
|
472
|
-
explicit constexpr CacheItemHelper(CacheEntryRole _role,
|
|
473
|
-
DeleterFn _del_cb = nullptr,
|
|
474
|
-
SizeCallback _size_cb = nullptr,
|
|
475
|
-
SaveToCallback _saveto_cb = nullptr,
|
|
476
|
-
CreateCallback _create_cb = nullptr)
|
|
477
|
-
: del_cb(_del_cb),
|
|
478
|
-
size_cb(_size_cb),
|
|
479
|
-
saveto_cb(_saveto_cb),
|
|
480
|
-
create_cb(_create_cb),
|
|
481
|
-
role(_role) {
|
|
482
|
-
// Either all three secondary cache callbacks are non-nullptr or
|
|
483
|
-
// all three are nullptr
|
|
484
|
-
assert((size_cb != nullptr) == (saveto_cb != nullptr));
|
|
485
|
-
assert((size_cb != nullptr) == (create_cb != nullptr));
|
|
486
|
-
}
|
|
487
|
-
inline bool IsSecondaryCacheCompatible() const {
|
|
488
|
-
return size_cb != nullptr;
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
|
|
492
|
-
public: // ctor/dtor/create
|
|
493
|
-
Cache(std::shared_ptr<MemoryAllocator> allocator = nullptr)
|
|
494
|
-
: memory_allocator_(std::move(allocator)) {}
|
|
495
|
-
// No copying allowed
|
|
496
|
-
Cache(const Cache&) = delete;
|
|
497
|
-
Cache& operator=(const Cache&) = delete;
|
|
498
|
-
|
|
499
|
-
// Destroys all remaining entries by calling the associated "deleter"
|
|
500
|
-
virtual ~Cache() {}
|
|
501
|
-
|
|
502
|
-
// Creates a new Cache based on the input value string and returns the result.
|
|
503
|
-
// Currently, this method can be used to create LRUCaches only
|
|
504
|
-
// @param config_options
|
|
505
|
-
// @param value The value might be:
|
|
506
|
-
// - an old-style cache ("1M") -- equivalent to NewLRUCache(1024*102(
|
|
507
|
-
// - Name-value option pairs -- "capacity=1M; num_shard_bits=4;
|
|
508
|
-
// For the LRUCache, the values are defined in LRUCacheOptions.
|
|
509
|
-
// @param result The new Cache object
|
|
510
|
-
// @return OK if the cache was successfully created
|
|
511
|
-
// @return NotFound if an invalid name was specified in the value
|
|
512
|
-
// @return InvalidArgument if either the options were not valid
|
|
513
|
-
static Status CreateFromString(const ConfigOptions& config_options,
|
|
514
|
-
const std::string& value,
|
|
515
|
-
std::shared_ptr<Cache>* result);
|
|
516
|
-
|
|
517
|
-
public: // functions
|
|
518
|
-
// The type of the Cache
|
|
519
|
-
virtual const char* Name() const = 0;
|
|
520
|
-
|
|
521
|
-
// The Insert and Lookup APIs below are intended to allow cached objects
|
|
522
|
-
// to be demoted/promoted between the primary block cache and a secondary
|
|
523
|
-
// cache. The secondary cache could be a non-volatile cache, and will
|
|
524
|
-
// likely store the object in a different representation. They rely on a
|
|
525
|
-
// per object CacheItemHelper to do the conversions.
|
|
526
|
-
// The secondary cache may persist across process and system restarts,
|
|
527
|
-
// and may even be moved between hosts. Therefore, the cache key must
|
|
528
|
-
// be repeatable across restarts/reboots, and globally unique if
|
|
529
|
-
// multiple DBs share the same cache and the set of DBs can change
|
|
530
|
-
// over time.
|
|
531
|
-
|
|
532
|
-
// Insert a mapping from key->object into the cache and assign it
|
|
533
|
-
// the specified charge against the total cache capacity. If
|
|
534
|
-
// strict_capacity_limit is true and cache reaches its full capacity,
|
|
535
|
-
// return Status::MemoryLimit. `obj` must be non-nullptr if compatible
|
|
536
|
-
// with secondary cache (helper->size_cb != nullptr), because Value() ==
|
|
537
|
-
// nullptr is reserved for indicating some secondary cache failure cases.
|
|
538
|
-
// On success, returns OK and takes ownership of `obj`, eventually deleting
|
|
539
|
-
// it with helper->del_cb. On non-OK return, the caller maintains ownership
|
|
540
|
-
// of `obj` so will often need to delete it in such cases.
|
|
541
|
-
//
|
|
542
|
-
// The helper argument is saved by the cache and will be used when the
|
|
543
|
-
// inserted object is evicted or considered for promotion to the secondary
|
|
544
|
-
// cache. Promotion to secondary cache is only enabled if helper->size_cb
|
|
545
|
-
// != nullptr. The helper must outlive the cache. Callers may use
|
|
546
|
-
// &kNoopCacheItemHelper as a trivial helper (no deleter for the object,
|
|
547
|
-
// no secondary cache). `helper` must not be nullptr (efficiency).
|
|
548
|
-
//
|
|
549
|
-
// If `handle` is not nullptr and return status is OK, `handle` is set
|
|
550
|
-
// to a Handle* for the entry. The caller must call this->Release(handle)
|
|
551
|
-
// when the returned entry is no longer needed. If `handle` is nullptr, it is
|
|
552
|
-
// as if Release is called immediately after Insert.
|
|
553
|
-
//
|
|
554
|
-
// Regardless of whether the item was inserted into the cache,
|
|
555
|
-
// it will attempt to insert it into the secondary cache if one is
|
|
556
|
-
// configured, and the helper supports it.
|
|
557
|
-
// The cache implementation must support a secondary cache, otherwise
|
|
558
|
-
// the item is only inserted into the primary cache. It may
|
|
559
|
-
// defer the insertion to the secondary cache as it sees fit.
|
|
560
|
-
//
|
|
561
|
-
// When the inserted entry is no longer needed, it will be destroyed using
|
|
562
|
-
// helper->del_cb (if non-nullptr).
|
|
563
|
-
virtual Status Insert(const Slice& key, ObjectPtr obj,
|
|
564
|
-
const CacheItemHelper* helper, size_t charge,
|
|
565
|
-
Handle** handle = nullptr,
|
|
566
|
-
Priority priority = Priority::LOW) = 0;
|
|
567
|
-
|
|
568
|
-
// Lookup the key, returning nullptr if not found. If found, returns
|
|
569
|
-
// a handle to the mapping that must eventually be passed to Release().
|
|
570
|
-
//
|
|
571
|
-
// If a non-nullptr helper argument is provided with a non-nullptr
|
|
572
|
-
// create_cb, and a secondary cache is configured, then the secondary
|
|
573
|
-
// cache is also queried if lookup in the primary cache fails. If found
|
|
574
|
-
// in secondary cache, the provided create_db and create_context are
|
|
575
|
-
// used to promote the entry to an object in the primary cache.
|
|
576
|
-
// In that case, the helper may be saved and used later when the object
|
|
577
|
-
// is evicted, so as usual, the pointed-to helper must outlive the cache.
|
|
578
|
-
//
|
|
579
|
-
// ======================== Async Lookup (wait=false) ======================
|
|
580
|
-
// When wait=false, the handle returned might be in any of three states:
|
|
581
|
-
// * Present - If Value() != nullptr, then the result is present and
|
|
582
|
-
// the handle can be used just as if wait=true.
|
|
583
|
-
// * Pending, not ready (IsReady() == false) - secondary cache is still
|
|
584
|
-
// working to retrieve the value. Might become ready any time.
|
|
585
|
-
// * Pending, ready (IsReady() == true) - secondary cache has the value
|
|
586
|
-
// but it has not been loaded as an object into primary cache. Call to
|
|
587
|
-
// Wait()/WaitAll() will not block.
|
|
588
|
-
//
|
|
589
|
-
// IMPORTANT: Pending handles are not thread-safe, and only these functions
|
|
590
|
-
// are allowed on them: Value(), IsReady(), Wait(), WaitAll(). Even Release()
|
|
591
|
-
// can only come after Wait() or WaitAll() even though a reference is held.
|
|
592
|
-
//
|
|
593
|
-
// Only Wait()/WaitAll() gets a Handle out of a Pending state. (Waiting is
|
|
594
|
-
// safe and has no effect on other handle states.) After waiting on a Handle,
|
|
595
|
-
// it is in one of two states:
|
|
596
|
-
// * Present - if Value() != nullptr
|
|
597
|
-
// * Failed - if Value() == nullptr, such as if the secondary cache
|
|
598
|
-
// initially thought it had the value but actually did not.
|
|
599
|
-
//
|
|
600
|
-
// Note that given an arbitrary Handle, the only way to distinguish the
|
|
601
|
-
// Pending+ready state from the Failed state is to Wait() on it. A cache
|
|
602
|
-
// entry not compatible with secondary cache can also have Value()==nullptr
|
|
603
|
-
// like the Failed state, but this is not generally a concern.
|
|
604
|
-
virtual Handle* Lookup(const Slice& key,
|
|
605
|
-
const CacheItemHelper* helper = nullptr,
|
|
606
|
-
CreateContext* create_context = nullptr,
|
|
607
|
-
Priority priority = Priority::LOW, bool wait = true,
|
|
608
|
-
Statistics* stats = nullptr) = 0;
|
|
609
|
-
|
|
610
|
-
// Convenience wrapper when secondary cache not supported
|
|
611
|
-
inline Handle* BasicLookup(const Slice& key, Statistics* stats) {
|
|
612
|
-
return Lookup(key, nullptr, nullptr, Priority::LOW, true, stats);
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
// Increments the reference count for the handle if it refers to an entry in
|
|
616
|
-
// the cache. Returns true if refcount was incremented; otherwise, returns
|
|
617
|
-
// false.
|
|
618
|
-
// REQUIRES: handle must have been returned by a method on *this.
|
|
619
|
-
virtual bool Ref(Handle* handle) = 0;
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* Release a mapping returned by a previous Lookup(). A released entry might
|
|
623
|
-
* still remain in cache in case it is later looked up by others. If
|
|
624
|
-
* erase_if_last_ref is set then it also erases it from the cache if there is
|
|
625
|
-
* no other reference to it. Erasing it should call the deleter function that
|
|
626
|
-
* was provided when the entry was inserted.
|
|
627
|
-
*
|
|
628
|
-
* Returns true if the entry was also erased.
|
|
629
|
-
*/
|
|
630
|
-
// REQUIRES: handle must not have been released yet.
|
|
631
|
-
// REQUIRES: handle must have been returned by a method on *this.
|
|
632
|
-
virtual bool Release(Handle* handle, bool erase_if_last_ref = false) = 0;
|
|
633
|
-
|
|
634
|
-
// Return the object assiciated with a handle returned by a successful
|
|
635
|
-
// Lookup(). For historical reasons, this is also known at the "value"
|
|
636
|
-
// associated with the key.
|
|
637
|
-
// REQUIRES: handle must not have been released yet.
|
|
638
|
-
// REQUIRES: handle must have been returned by a method on *this.
|
|
639
|
-
virtual ObjectPtr Value(Handle* handle) = 0;
|
|
640
|
-
|
|
641
|
-
// If the cache contains the entry for the key, erase it. Note that the
|
|
642
|
-
// underlying entry will be kept around until all existing handles
|
|
643
|
-
// to it have been released.
|
|
644
|
-
virtual void Erase(const Slice& key) = 0;
|
|
645
|
-
// Return a new numeric id. May be used by multiple clients who are
|
|
646
|
-
// sharding the same cache to partition the key space. Typically the
|
|
647
|
-
// client will allocate a new id at startup and prepend the id to
|
|
648
|
-
// its cache keys.
|
|
649
|
-
virtual uint64_t NewId() = 0;
|
|
650
|
-
|
|
651
|
-
// sets the maximum configured capacity of the cache. When the new
|
|
652
|
-
// capacity is less than the old capacity and the existing usage is
|
|
653
|
-
// greater than new capacity, the implementation will do its best job to
|
|
654
|
-
// purge the released entries from the cache in order to lower the usage
|
|
655
|
-
virtual void SetCapacity(size_t capacity) = 0;
|
|
656
|
-
|
|
657
|
-
// Set whether to return error on insertion when cache reaches its full
|
|
658
|
-
// capacity.
|
|
659
|
-
virtual void SetStrictCapacityLimit(bool strict_capacity_limit) = 0;
|
|
660
|
-
|
|
661
|
-
// Get the flag whether to return error on insertion when cache reaches its
|
|
662
|
-
// full capacity.
|
|
663
|
-
virtual bool HasStrictCapacityLimit() const = 0;
|
|
664
|
-
|
|
665
|
-
// Returns the maximum configured capacity of the cache
|
|
666
|
-
virtual size_t GetCapacity() const = 0;
|
|
667
|
-
|
|
668
|
-
// Returns the memory size for the entries residing in the cache.
|
|
669
|
-
virtual size_t GetUsage() const = 0;
|
|
670
|
-
|
|
671
|
-
// Returns the number of entries currently tracked in the table. SIZE_MAX
|
|
672
|
-
// means "not supported." This is used for inspecting the load factor, along
|
|
673
|
-
// with GetTableAddressCount().
|
|
674
|
-
virtual size_t GetOccupancyCount() const { return SIZE_MAX; }
|
|
675
|
-
|
|
676
|
-
// Returns the number of ways the hash function is divided for addressing
|
|
677
|
-
// entries. Zero means "not supported." This is used for inspecting the load
|
|
678
|
-
// factor, along with GetOccupancyCount().
|
|
679
|
-
virtual size_t GetTableAddressCount() const { return 0; }
|
|
680
|
-
|
|
681
|
-
// Returns the memory size for a specific entry in the cache.
|
|
682
|
-
virtual size_t GetUsage(Handle* handle) const = 0;
|
|
683
|
-
|
|
684
|
-
// Returns the memory size for the entries in use by the system
|
|
685
|
-
virtual size_t GetPinnedUsage() const = 0;
|
|
686
|
-
|
|
687
|
-
// Returns the charge for the specific entry in the cache.
|
|
688
|
-
virtual size_t GetCharge(Handle* handle) const = 0;
|
|
689
|
-
|
|
690
|
-
// Returns the helper for the specified entry.
|
|
691
|
-
virtual const CacheItemHelper* GetCacheItemHelper(Handle* handle) const = 0;
|
|
692
|
-
|
|
693
|
-
// Call this on shutdown if you want to speed it up. Cache will disown
|
|
694
|
-
// any underlying data and will not free it on delete. This call will leak
|
|
695
|
-
// memory - call this only if you're shutting down the process.
|
|
696
|
-
// Any attempts of using cache after this call will fail terribly.
|
|
697
|
-
// Always delete the DB object before calling this method!
|
|
698
|
-
virtual void DisownData() {
|
|
699
|
-
// default implementation is noop
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
struct ApplyToAllEntriesOptions {
|
|
703
|
-
// If the Cache uses locks, setting `average_entries_per_lock` to
|
|
704
|
-
// a higher value suggests iterating over more entries each time a lock
|
|
705
|
-
// is acquired, likely reducing the time for ApplyToAllEntries but
|
|
706
|
-
// increasing latency for concurrent users of the Cache. Setting
|
|
707
|
-
// `average_entries_per_lock` to a smaller value could be helpful if
|
|
708
|
-
// callback is relatively expensive, such as using large data structures.
|
|
709
|
-
size_t average_entries_per_lock = 256;
|
|
710
|
-
};
|
|
711
|
-
|
|
712
|
-
// Apply a callback to all entries in the cache. The Cache must ensure
|
|
713
|
-
// thread safety but does not guarantee that a consistent snapshot of all
|
|
714
|
-
// entries is iterated over if other threads are operating on the Cache
|
|
715
|
-
// also.
|
|
716
|
-
virtual void ApplyToAllEntries(
|
|
717
|
-
const std::function<void(const Slice& key, ObjectPtr obj, size_t charge,
|
|
718
|
-
const CacheItemHelper* helper)>& callback,
|
|
719
|
-
const ApplyToAllEntriesOptions& opts) = 0;
|
|
720
|
-
|
|
721
|
-
// Remove all entries.
|
|
722
|
-
// Prerequisite: no entry is referenced.
|
|
723
|
-
virtual void EraseUnRefEntries() = 0;
|
|
724
|
-
|
|
725
|
-
virtual std::string GetPrintableOptions() const { return ""; }
|
|
726
|
-
|
|
727
|
-
// Check for any warnings or errors in the operation of the cache and
|
|
728
|
-
// report them to the logger. This is intended only to be called
|
|
729
|
-
// periodically so does not need to be very efficient. (Obscure calling
|
|
730
|
-
// conventions for Logger inherited from env.h)
|
|
731
|
-
virtual void ReportProblems(
|
|
732
|
-
const std::shared_ptr<Logger>& /*info_log*/) const {}
|
|
733
|
-
|
|
734
|
-
MemoryAllocator* memory_allocator() const { return memory_allocator_.get(); }
|
|
735
|
-
|
|
736
|
-
// EXPERIMENTAL
|
|
737
|
-
// The following APIs are experimental and might change in the future.
|
|
738
|
-
|
|
739
|
-
// Release a mapping returned by a previous Lookup(). The "useful"
|
|
740
|
-
// parameter specifies whether the data was actually used or not,
|
|
741
|
-
// which may be used by the cache implementation to decide whether
|
|
742
|
-
// to consider it as a hit for retention purposes. As noted elsewhere,
|
|
743
|
-
// "pending" handles require Wait()/WaitAll() before Release().
|
|
744
|
-
virtual bool Release(Handle* handle, bool /*useful*/,
|
|
745
|
-
bool erase_if_last_ref) {
|
|
746
|
-
return Release(handle, erase_if_last_ref);
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
// Determines if the handle returned by Lookup() can give a value without
|
|
750
|
-
// blocking, though Wait()/WaitAll() might be required to publish it to
|
|
751
|
-
// Value(). See secondary cache compatible Lookup() above for details.
|
|
752
|
-
// This call is not thread safe on "pending" handles.
|
|
753
|
-
virtual bool IsReady(Handle* /*handle*/) { return true; }
|
|
754
|
-
|
|
755
|
-
// Convert a "pending" handle into a full thread-shareable handle by
|
|
756
|
-
// * If necessary, wait until secondary cache finishes loading the value.
|
|
757
|
-
// * Construct the object for primary cache and set it in the handle.
|
|
758
|
-
// Even after Wait() on a pending handle, the caller must check for
|
|
759
|
-
// Value() == nullptr in case of failure. This call is not thread-safe
|
|
760
|
-
// on pending handles. This call has no effect on non-pending handles.
|
|
761
|
-
// See secondary cache compatible Lookup() above for details.
|
|
762
|
-
virtual void Wait(Handle* /*handle*/) {}
|
|
763
|
-
|
|
764
|
-
// Wait for a vector of handles to become ready. As with Wait(), the user
|
|
765
|
-
// should check the Value() of each handle for nullptr. This call is not
|
|
766
|
-
// thread-safe on pending handles.
|
|
767
|
-
virtual void WaitAll(std::vector<Handle*>& /*handles*/) {}
|
|
768
|
-
|
|
769
|
-
private:
|
|
770
|
-
std::shared_ptr<MemoryAllocator> memory_allocator_;
|
|
771
|
-
};
|
|
772
|
-
|
|
773
|
-
// Useful for cache entries requiring no clean-up, such as for cache
|
|
774
|
-
// reservations
|
|
775
|
-
inline constexpr Cache::CacheItemHelper kNoopCacheItemHelper{};
|
|
776
|
-
|
|
777
363
|
} // namespace ROCKSDB_NAMESPACE
|
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
#include <cassert>
|
|
12
12
|
#include <memory>
|
|
13
13
|
#include <string>
|
|
14
|
+
#include <utility>
|
|
14
15
|
#include <vector>
|
|
15
16
|
|
|
16
17
|
#include "rocksdb/customizable.h"
|
|
17
18
|
#include "rocksdb/rocksdb_namespace.h"
|
|
18
19
|
#include "rocksdb/types.h"
|
|
20
|
+
#include "rocksdb/wide_columns.h"
|
|
19
21
|
|
|
20
22
|
namespace ROCKSDB_NAMESPACE {
|
|
21
23
|
|
|
@@ -34,6 +36,7 @@ class CompactionFilter : public Customizable {
|
|
|
34
36
|
kValue,
|
|
35
37
|
kMergeOperand,
|
|
36
38
|
kBlobIndex, // used internally by BlobDB.
|
|
39
|
+
kWideColumnEntity,
|
|
37
40
|
};
|
|
38
41
|
|
|
39
42
|
enum class Decision {
|
|
@@ -44,6 +47,7 @@ class CompactionFilter : public Customizable {
|
|
|
44
47
|
kChangeBlobIndex, // used internally by BlobDB.
|
|
45
48
|
kIOError, // used internally by BlobDB.
|
|
46
49
|
kPurge, // used for keys that can only be SingleDelete'ed
|
|
50
|
+
kChangeWideColumnEntity,
|
|
47
51
|
kUndetermined,
|
|
48
52
|
};
|
|
49
53
|
|
|
@@ -176,15 +180,57 @@ class CompactionFilter : public Customizable {
|
|
|
176
180
|
}
|
|
177
181
|
return value_changed ? Decision::kChangeValue : Decision::kKeep;
|
|
178
182
|
}
|
|
183
|
+
|
|
179
184
|
case ValueType::kMergeOperand: {
|
|
180
185
|
bool rv = FilterMergeOperand(level, key, existing_value);
|
|
181
186
|
return rv ? Decision::kRemove : Decision::kKeep;
|
|
182
187
|
}
|
|
188
|
+
|
|
183
189
|
case ValueType::kBlobIndex:
|
|
184
190
|
return Decision::kKeep;
|
|
191
|
+
|
|
192
|
+
default:
|
|
193
|
+
assert(false);
|
|
194
|
+
return Decision::kKeep;
|
|
185
195
|
}
|
|
186
|
-
|
|
187
|
-
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Wide column aware API. Called for plain values, merge operands, and
|
|
199
|
+
// wide-column entities; the `value_type` parameter indicates the type of the
|
|
200
|
+
// key-value. When the key-value is a plain value or a merge operand, the
|
|
201
|
+
// `existing_value` parameter contains the existing value and the
|
|
202
|
+
// `existing_columns` parameter is invalid (nullptr). When the key-value is a
|
|
203
|
+
// wide-column entity, the `existing_columns` parameter contains the wide
|
|
204
|
+
// columns of the existing entity and the `existing_value` parameter is
|
|
205
|
+
// invalid (nullptr). The output parameters `new_value` and `new_columns` can
|
|
206
|
+
// be used to change the value or wide columns of the key-value when
|
|
207
|
+
// `kChangeValue` or `kChangeWideColumnEntity` is returned. See above for more
|
|
208
|
+
// information on the semantics of the potential return values.
|
|
209
|
+
//
|
|
210
|
+
// For compatibility, the default implementation keeps all wide-column
|
|
211
|
+
// entities, and falls back to FilterV2 for plain values and merge operands.
|
|
212
|
+
// If you override this method, there is no need to override FilterV2 (or
|
|
213
|
+
// Filter/FilterMergeOperand).
|
|
214
|
+
virtual Decision FilterV3(
|
|
215
|
+
int level, const Slice& key, ValueType value_type,
|
|
216
|
+
const Slice* existing_value, const WideColumns* existing_columns,
|
|
217
|
+
std::string* new_value,
|
|
218
|
+
std::vector<std::pair<std::string, std::string>>* /* new_columns */,
|
|
219
|
+
std::string* skip_until) const {
|
|
220
|
+
#ifdef NDEBUG
|
|
221
|
+
(void)existing_columns;
|
|
222
|
+
#endif
|
|
223
|
+
|
|
224
|
+
assert(!existing_value || !existing_columns);
|
|
225
|
+
assert(value_type == ValueType::kWideColumnEntity || existing_value);
|
|
226
|
+
assert(value_type != ValueType::kWideColumnEntity || existing_columns);
|
|
227
|
+
|
|
228
|
+
if (value_type == ValueType::kWideColumnEntity) {
|
|
229
|
+
return Decision::kKeep;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return FilterV2(level, key, value_type, *existing_value, new_value,
|
|
233
|
+
skip_until);
|
|
188
234
|
}
|
|
189
235
|
|
|
190
236
|
// Internal (BlobDB) use only. Do not override in application code.
|
|
@@ -211,7 +257,7 @@ class CompactionFilter : public Customizable {
|
|
|
211
257
|
// In the case of BlobDB, it may be possible to reach a decision with only
|
|
212
258
|
// the key without reading the actual value. Keys whose value_type is
|
|
213
259
|
// kBlobIndex will be checked by this method.
|
|
214
|
-
// Returning kUndetermined will cause
|
|
260
|
+
// Returning kUndetermined will cause FilterV3() to be called to make a
|
|
215
261
|
// decision as usual.
|
|
216
262
|
virtual Decision FilterBlobByKey(int /*level*/, const Slice& /*key*/,
|
|
217
263
|
std::string* /*new_value*/,
|
|
@@ -49,10 +49,8 @@ class Configurable {
|
|
|
49
49
|
std::string name;
|
|
50
50
|
// Pointer to the object being registered
|
|
51
51
|
void* opt_ptr;
|
|
52
|
-
#ifndef ROCKSDB_LITE
|
|
53
52
|
// The map of options being registered
|
|
54
53
|
const std::unordered_map<std::string, OptionTypeInfo>* type_map;
|
|
55
|
-
#endif
|
|
56
54
|
};
|
|
57
55
|
|
|
58
56
|
public:
|
|
@@ -121,7 +119,6 @@ class Configurable {
|
|
|
121
119
|
const std::unordered_map<std::string, std::string>& opt_map,
|
|
122
120
|
std::unordered_map<std::string, std::string>* unused);
|
|
123
121
|
|
|
124
|
-
#ifndef ROCKSDB_LITE
|
|
125
122
|
// Updates the named option to the input value, returning OK if successful.
|
|
126
123
|
// Note that ConfigureOption does not cause PrepareOptions to be invoked.
|
|
127
124
|
// @param config_options Controls how the name/value is processed.
|
|
@@ -135,7 +132,6 @@ class Configurable {
|
|
|
135
132
|
// @return InvalidArgument If the value cannot be successfully parsed.
|
|
136
133
|
Status ConfigureOption(const ConfigOptions& config_options,
|
|
137
134
|
const std::string& name, const std::string& value);
|
|
138
|
-
#endif // ROCKSDB_LITE
|
|
139
135
|
|
|
140
136
|
// Configures the options for this class based on the input parameters.
|
|
141
137
|
// On successful completion, the object is updated with the settings from
|
|
@@ -171,7 +167,6 @@ class Configurable {
|
|
|
171
167
|
// serialized.
|
|
172
168
|
Status GetOptionString(const ConfigOptions& config_options,
|
|
173
169
|
std::string* result) const;
|
|
174
|
-
#ifndef ROCKSDB_LITE
|
|
175
170
|
// Returns the serialized options for this object.
|
|
176
171
|
// This method is similar to GetOptionString with no errors.
|
|
177
172
|
// @param config_options Controls how serialization happens.
|
|
@@ -202,7 +197,6 @@ class Configurable {
|
|
|
202
197
|
// its value cannot be serialized.
|
|
203
198
|
virtual Status GetOption(const ConfigOptions& config_options,
|
|
204
199
|
const std::string& name, std::string* value) const;
|
|
205
|
-
#endif // ROCKSDB_LITE
|
|
206
200
|
|
|
207
201
|
// Checks to see if this Configurable is equivalent to other.
|
|
208
202
|
// This method assumes that the two objects are of the same class.
|
|
@@ -317,7 +311,6 @@ class Configurable {
|
|
|
317
311
|
const std::unordered_map<std::string, std::string>& opts_map,
|
|
318
312
|
std::unordered_map<std::string, std::string>* unused);
|
|
319
313
|
|
|
320
|
-
#ifndef ROCKSDB_LITE
|
|
321
314
|
// Method that configures a the specific opt_name from opt_value.
|
|
322
315
|
// By default, this method calls opt_info.ParseOption with the
|
|
323
316
|
// input parameters.
|
|
@@ -348,13 +341,10 @@ class Configurable {
|
|
|
348
341
|
const void* const this_ptr,
|
|
349
342
|
const void* const that_ptr,
|
|
350
343
|
std::string* bad_name) const;
|
|
351
|
-
#endif
|
|
352
|
-
#ifndef ROCKSDB_LITE
|
|
353
344
|
// Internal method to serialize options (ToString)
|
|
354
345
|
// Classes may override this value to change its behavior.
|
|
355
346
|
virtual std::string SerializeOptions(const ConfigOptions& config_options,
|
|
356
347
|
const std::string& header) const;
|
|
357
|
-
#endif // ROCKSDB_LITE
|
|
358
348
|
|
|
359
349
|
// Given a name (e.g. rocksdb.my.type.opt), returns the short name (opt)
|
|
360
350
|
virtual std::string GetOptionName(const std::string& long_name) const;
|