rocksdb/options
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
..
cf_options.cc add whole key bloom filter support in memtables (#4985) 2019-02-19 12:15:39 -08:00
cf_options.h Feature for sampling and reporting compressibility (#4842) 2019-03-18 12:15:34 -07:00
db_options.cc Add DBOptions. avoid_unnecessary_blocking_io to defer file deletions (#5043) 2019-04-01 17:10:40 -07:00
db_options.h Add DBOptions. avoid_unnecessary_blocking_io to defer file deletions (#5043) 2019-04-01 17:10:40 -07:00
options_helper.cc Add DBOptions. avoid_unnecessary_blocking_io to defer file deletions (#5043) 2019-04-01 17:10:40 -07:00
options_helper.h add OptionType kInt32T and kInt64T 2019-03-12 13:49:52 -07:00
options_parser.cc add OptionType kInt32T and kInt64T 2019-03-12 13:49:52 -07:00
options_parser.h WritePrepared Txn: Optimize for recoverable state 2017-11-01 17:26:46 -07:00
options_sanity_check.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
options_sanity_check.h Change RocksDB License 2017-07-15 16:11:23 -07:00
options_settable_test.cc Add DBOptions. avoid_unnecessary_blocking_io to defer file deletions (#5043) 2019-04-01 17:10:40 -07:00
options_test.cc Option string/map can set merge operator from object registry (#5123) 2019-03-28 14:54:29 -07:00
options.cc Feature for sampling and reporting compressibility (#4842) 2019-03-18 12:15:34 -07:00