rocksdb/utilities
Andrew Kryczka e5e545a021 Reunite checkpoint and backup core logic
Summary:
These code paths forked when checkpoint was introduced by copy/pasting the core backup logic. Over time they diverged and bug fixes were sometimes applied to one but not the other (like fix to include all relevant WALs for 2PC), or it required extra effort to fix both (like fix to forge CURRENT file). This diff reunites the code paths by extracting the core logic into a function, CreateCustomCheckpoint(), that is customizable via callbacks to implement both checkpoint and backup.

Related changes:

- flush_before_backup is now forcibly enabled when 2PC is enabled
- Extracted CheckpointImpl class definition into a header file. This is so the function, CreateCustomCheckpoint(), can be called by internal rocksdb code but not exposed to users.
- Implemented more functions in DummyDB/DummyLogFile (in backupable_db_test.cc) that are used by CreateCustomCheckpoint().
Closes https://github.com/facebook/rocksdb/pull/1932

Differential Revision: D4622986

Pulled By: ajkr

fbshipit-source-id: 157723884236ee3999a682673b64f7457a7a0d87
2017-04-24 15:06:46 -07:00
..
backupable Reunite checkpoint and backup core logic 2017-04-24 15:06:46 -07:00
blob_db Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
checkpoint Reunite checkpoint and backup core logic 2017-04-24 15:06:46 -07:00
compaction_filters Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
convenience Move auto_roll_logger and filename out of db/ 2017-04-03 18:39:14 -07:00
date_tiered Reduce the number of params needed to construct DBIter 2017-04-10 11:14:14 -07:00
document make all DB::Get overloads virtual 2017-03-30 23:39:14 -07:00
geodb Move auto_roll_logger and filename out of db/ 2017-04-03 18:39:14 -07:00
leveldb_options Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
lua Level-based L0->L0 compaction 2017-04-04 18:09:11 -07:00
memory Disable auto compactions in memory_test and re-enable the test (#1408) 2016-10-19 18:18:42 -07:00
merge_operators Add macros to include file name and line number during Logging 2017-03-15 19:39:12 -07:00
option_change_migration option_change_migration_test: force full compaction when needed 2016-11-15 22:09:34 -08:00
options Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
persistent_cache AIX and Solaris Sparc Support 2017-04-21 20:48:04 -07:00
redis Eliminate use of 'using namespace std'. Also remove a number of ADL references to std functions. 2016-05-20 07:42:18 -07:00
simulator_cache Add erase option to release cache 2017-04-24 11:28:36 -07:00
spatialdb Change Build Env to gcc-5 2017-04-14 11:12:56 -07:00
table_properties_collectors Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
transactions StackableDB should pass ResetStats() 2017-04-20 16:11:56 -07:00
ttl Move various string utility functions into string_util 2017-04-06 14:54:12 -07:00
write_batch_with_index Limit maximum memory used in the WriteBatch representation 2017-04-10 15:42:26 -07:00
col_buf_decoder.cc fix non-portable behavior in encoder 2017-01-20 16:39:22 -08:00
col_buf_decoder.h Fix clang build failure and refactor unit test 2016-08-02 15:16:39 -07:00
col_buf_encoder.cc Fix travis (compile for clang < 3.9) 2016-12-01 10:09:22 -08:00
col_buf_encoder.h Fix clang build failure and refactor unit test 2016-08-02 15:16:39 -07:00
column_aware_encoding_exp.cc Fix build on FreeBSD 2017-01-10 11:39:12 -08:00
column_aware_encoding_test.cc AIX and Solaris Sparc Support 2017-04-21 20:48:04 -07:00
column_aware_encoding_util.cc Fix Windows build issues (#1253) 2016-08-02 17:15:18 -07:00
column_aware_encoding_util.h Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
env_librados_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
env_librados.cc change UseDirectIO() to use_direct_io() 2017-01-13 12:09:15 -08:00
env_librados.md Add EnvLibrados - RocksDB Env of RADOS (#1222) 2016-07-21 11:16:34 -07:00
env_mirror_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
env_mirror.cc direct io write support 2016-12-22 13:09:19 -08:00
env_timed_test.cc add TimedEnv 2017-04-04 11:24:12 -07:00
env_timed.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
merge_operators.h Introduce FullMergeV2 (eliminate memcpy from merge operators) 2016-07-20 09:49:03 -07:00
object_registry_test.cc Generalize Env registration framework 2017-01-25 16:09:14 -08:00
util_merge_operators_test.cc Introduce FullMergeV2 (eliminate memcpy from merge operators) 2016-07-20 09:49:03 -07:00