rocksdb/include/rocksdb
Mike Kolupaev 120bc4715b Add DBOptions. avoid_unnecessary_blocking_io to defer file deletions (#5043)
Summary:
Just like ReadOptions::background_purge_on_iterator_cleanup but for ColumnFamilyHandle instead of Iterator.

In our use case we sometimes call ColumnFamilyHandle's destructor from low-latency threads, and sometimes it blocks the thread for a few seconds deleting the files. To avoid that, we can either offload ColumnFamilyHandle's destruction to a background thread on our side, or add this option on rocksdb side. This PR does the latter, to be consistent with how we solve exactly the same problem for iterators using background_purge_on_iterator_cleanup option.

(EDIT: It's avoid_unnecessary_blocking_io now, and affects both CF drops and iterator destructors.)
I'm not quite comfortable with having two separate options (background_purge_on_iterator_cleanup and background_purge_on_cf_cleanup) for such a rarely used thing. Maybe we should merge them? Rename background_purge_on_cf_cleanup to something like delete_files_on_background_threads_only or avoid_blocking_io_in_unexpected_places, and make iterators use it instead of the one in ReadOptions? I can do that here if you guys think it's better.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5043

Differential Revision: D14339233

Pulled By: al13n321

fbshipit-source-id: ccf7efa11c85c9a5b91d969bb55627d0fb01e7b8
2019-04-01 17:10:40 -07:00
..
utilities Option string/map can set merge operator from object registry (#5123) 2019-03-28 14:54:29 -07:00
advanced_options.h Feature for sampling and reporting compressibility (#4842) 2019-03-18 12:15:34 -07:00
c.h Add missing C API for transaction (#5077) 2019-03-19 09:43:22 -07:00
cache.h Make adaptivity of LRU cache mutexes configurable (#5054) 2019-03-20 12:33:44 -07:00
cleanable.h Support pragma once in all header files and cleanup some warnings (#4339) 2018-09-05 18:13:31 -07:00
compaction_filter.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
compaction_job_stats.h Add a new CPU time counter to compaction report (#4889) 2019-01-29 17:24:00 -08:00
comparator.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
concurrent_task_limiter.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
convenience.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
db_bench_tool.h Change RocksDB License 2017-07-15 16:11:23 -07:00
db_dump_tool.h Fix some typos in comments and docs. 2018-03-08 10:27:25 -08:00
db.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
env_encryption.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
env.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
experimental.h Change RocksDB License 2017-07-15 16:11:23 -07:00
filter_policy.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
flush_block_policy.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
iostats_context.h Add a new CPU time counter to compaction report (#4889) 2019-01-29 17:24:00 -08:00
iterator.h Revert "BaseDeltaIterator: always check valid() before accessing key(… (#4744) 2018-12-03 23:38:27 -08:00
ldb_tool.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
listener.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
memory_allocator.h JemallocNodumpAllocator: option to limit tcache memory usage (#4736) 2018-11-29 17:33:40 -08:00
memtablerep.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
merge_operator.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
metadata.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
options.h Add DBOptions. avoid_unnecessary_blocking_io to defer file deletions (#5043) 2019-04-01 17:10:40 -07:00
perf_context.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
perf_level.h Introduce a CPU time counter in perf_context (#4741) 2018-12-20 12:03:44 -08:00
persistent_cache.h Change RocksDB License 2017-07-15 16:11:23 -07:00
rate_limiter.h Fix typos in comments (#4819) 2018-12-26 09:43:56 -08:00
slice_transform.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
slice.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
snapshot.h Change RocksDB License 2017-07-15 16:11:23 -07:00
sst_dump_tool.h tools: use provided options instead of the default (#4839) 2019-01-03 11:23:49 -08:00
sst_file_manager.h Smooth the deletion of WAL files (#5116) 2019-03-28 15:17:13 -07:00
sst_file_reader.h Get CompactionJobInfo from CompactFiles 2018-12-13 14:21:24 -08:00
sst_file_writer.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
statistics.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
stats_history.h add GetStatsHistory to retrieve stats snapshots (#4748) 2019-02-20 15:52:54 -08:00
status.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
table_properties.h Feature for sampling and reporting compressibility (#4842) 2019-03-18 12:15:34 -07:00
table.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
thread_status.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
threadpool.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
trace_reader_writer.h Add the max trace file size limitation option to Tracing (#4610) 2018-11-27 14:27:05 -08:00
transaction_log.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
types.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
universal_compaction.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
version.h Update history and version for 6.1 2019-03-27 11:21:34 -07:00
wal_filter.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
write_batch_base.h Fix WriteBatchBase::DeleteRange API comment (#4935) 2019-01-31 14:43:40 -08:00
write_batch.h Run automatic formatter against public header files (#5115) 2019-03-27 13:24:25 -07:00
write_buffer_manager.h WriteBufferManger doens't cost to cache if no limit is set (#4695) 2018-11-18 16:55:43 -08:00