rocksdb/include/rocksdb
Peter Dillinger a7fd1d0881 Make backup restore atomic, with sync option (#8568)
Summary:
Guarantees that if a restore is interrupted, DB::Open will fail. This works by
restoring CURRENT first to CURRENT.tmp then as a final step renaming to CURRENT.

Also makes restore respect BackupEngineOptions::sync (default true). When set,
the restore is guaranteed persisted by the time it returns OK. Also makes the above
atomicity guarantee work in case the interruption is power loss or OS crash (not just
process interruption or crash).

Fixes https://github.com/facebook/rocksdb/issues/8500

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8568

Test Plan:
added to backup mini-stress unit test. Passes with
gtest_repeat=100 (whereas fails 7 times without the CURRENT.tmp)

Reviewed By: akankshamahajan15

Differential Revision: D29812605

Pulled By: pdillinger

fbshipit-source-id: 24e9a993b305b1835ca95558fa7a7152e54cda8e
2021-08-06 09:50:21 -07:00
..
utilities Make backup restore atomic, with sync option (#8568) 2021-08-06 09:50:21 -07:00
advanced_options.h The formal parameter types of CompressionOptions constructor should b… (#8510) 2021-07-15 18:06:50 -07:00
c.h Add ribbon filter to C API (#8486) 2021-07-09 16:22:48 -07:00
cache_bench_tool.h Allow cache_bench/db_bench to use a custom secondary cache (#8312) 2021-05-19 15:26:18 -07:00
cache.h Parallelize secondary cache lookup in MultiGet (#8405) 2021-06-18 09:35:59 -07:00
cleanable.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
compaction_filter.h Make MergeOperator+CompactionFilter/Factory into Customizable Classes (#8481) 2021-08-06 08:27:25 -07:00
compaction_job_stats.h Update compaction statistics to include the amount of data read from blob files (#8022) 2021-03-04 00:43:48 -08:00
comparator.h Make Comparator into a Customizable Object (#8336) 2021-06-11 06:22:59 -07:00
compression_type.h Move CompressionType to its own header file (#7162) 2020-08-03 15:49:31 -07:00
concurrent_task_limiter.h Fix spelling in comments in include/rocksdb/ (#8120) 2021-03-29 05:05:06 -07:00
configurable.h Make FlushBlockPolicyFactory into a Customizable class (#8432) 2021-07-12 09:04:59 -07:00
convenience.h Add ObjectRegistry to ConfigOptions (#8166) 2021-05-11 06:47:22 -07:00
customizable.h Make MergeOperator+CompactionFilter/Factory into Customizable Classes (#8481) 2021-08-06 08:27:25 -07:00
data_structure.h Handoff checksum Implementation (#7523) 2021-02-10 22:20:32 -08:00
db_bench_tool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_dump_tool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_stress_tool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db.h Add BlobMetaData retrieval methods (#8273) 2021-06-28 08:13:29 -07:00
env_encryption.h Make EncryptionProvider and BlockCipher into Customizable objects (#8354) 2021-07-16 07:58:51 -07:00
env.h Add CreateFrom methods to Env/FileSystem (#8174) 2021-06-15 03:43:48 -07:00
experimental.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
file_checksum.h Fix spelling in comments in include/rocksdb/ (#8120) 2021-03-29 05:05:06 -07:00
file_system.h Add CreateFrom methods to Env/FileSystem (#8174) 2021-06-15 03:43:48 -07:00
filter_policy.h Mark Ribbon filter and optimize_filters_for_memory as production (#8408) 2021-06-17 12:29:16 -07:00
flush_block_policy.h Make FlushBlockPolicyFactory into a Customizable class (#8432) 2021-07-12 09:04:59 -07:00
functor_wrapper.h Add StartThread type checking wrapper (#8303) 2021-05-19 16:51:13 -07:00
io_status.h Add a new IOStatus subcode to indicate that writes are fenced off (#7374) 2020-09-14 16:04:47 -07:00
iostats_context.h Disable IOStatsContext/PerfContext if no thread local (#8117) 2021-04-13 07:56:59 -07:00
iterator.h Enable backward iterator for keys with user-defined timestamp (#8035) 2021-03-10 11:15:46 -08:00
ldb_tool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
listener.h Make EventListener into a Customizable Class (#8473) 2021-07-27 07:47:02 -07:00
memory_allocator.h slightly improve jemalloc allocator API header (#7592) 2020-10-28 13:47:12 -07:00
memtablerep.h Fix comment spelling (#7960) 2021-03-29 10:37:24 -07:00
merge_operator.h Make MergeOperator+CompactionFilter/Factory into Customizable Classes (#8481) 2021-08-06 08:27:25 -07:00
metadata.h Add BlobMetaData retrieval methods (#8273) 2021-06-28 08:13:29 -07:00
options.h Add simple heuristics for experimental mempurge. (#8583) 2021-07-26 11:56:29 -07:00
perf_context.h Disable IOStatsContext/PerfContext if no thread local (#8117) 2021-04-13 07:56:59 -07:00
perf_level.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
persistent_cache.h Fix persistent cache on windows (#6932) 2020-06-13 13:28:31 -07:00
rate_limiter.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
rocksdb_namespace.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
secondary_cache.h Make SecondaryCache Customizable (#8480) 2021-07-06 09:18:08 -07:00
slice_transform.h Fix spelling in comments in include/rocksdb/ (#8120) 2021-03-29 05:05:06 -07:00
slice.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
snapshot.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
sst_dump_tool.h Add --version and --help to ldb and sst_dump (#6951) 2020-06-09 10:04:01 -07:00
sst_file_manager.h Use SST file manager to track blob files as well (#8037) 2021-03-17 20:44:49 -07:00
sst_file_reader.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
sst_file_writer.h Add more LSM info to FilterBuildingContext (#8246) 2021-04-30 13:50:13 -07:00
sst_partitioner.h Fix spelling in comments in include/rocksdb/ (#8120) 2021-03-29 05:05:06 -07:00
statistics.h Don't hold DB mutex for block cache entry stat scans (#8538) 2021-07-16 14:13:08 -07:00
stats_history.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
status.h Fix comments in Status (#8429) 2021-06-21 13:41:08 -07:00
system_clock.h Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
table_properties.h Add table properties for number of entries added to filters (#8323) 2021-05-21 17:11:32 -07:00
table.h Dynamically configure BlockBasedTableOptions.prepopulate_block_cache (#8620) 2021-08-05 19:44:51 -07:00
thread_status.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
threadpool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
trace_reader_writer.h Fix spelling in comments in include/rocksdb/ (#8120) 2021-03-29 05:05:06 -07:00
transaction_log.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
types.h Add more LSM info to FilterBuildingContext (#8246) 2021-04-30 13:50:13 -07:00
universal_compaction.h Fix spelling in comments in include/rocksdb/ (#8120) 2021-03-29 05:05:06 -07:00
version.h Update HISTORY.md and version.h 6.23 release (#8552) 2021-07-16 17:52:14 -07:00
wal_filter.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
write_batch_base.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
write_batch.h Fix spelling in comments in include/rocksdb/ (#8120) 2021-03-29 05:05:06 -07:00
write_buffer_manager.h Stall writes in WriteBufferManager when memory_usage exceeds buffer_size (#7898) 2021-04-21 13:54:02 -07:00