rocksdb/db/db_impl
Affan Dar 229e6fbe0e Adding DB::GetCurrentWalFile() API as a repliction/backup helper (#5765)
Summary:
Adding a light weight API to get last live WAL file name and size. Meant to be used as a helper for backup/restore tooling in a larger ecosystem such as MySQL with a MyRocks storage engine.

Specifically within MySQL's backup/restore mechanism, this call can be made with a write lock on the mysql db to get a transactionally consistent snapshot of the current WAL file position along with other non-rocksdb log/data files.

Without this, the alternative would be to take the aforementioned lock, scan the WAL dir for all files, find the last file and note its exact size as the rocksdb 'checkpoint'.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5765

Differential Revision: D17172717

Pulled By: affandar

fbshipit-source-id: f2fabafd4c0e6fc45f126670c8c88a9f84cb8a37
2019-09-04 12:10:17 -07:00
..
db_impl_compaction_flush.cc replace some reinterpret_cast with static_cast_with_check (#5740) 2019-08-27 10:59:11 -07:00
db_impl_debug.cc Add command "list_file_range_deletes" in ldb (#5615) 2019-08-15 17:01:03 -07:00
db_impl_experimental.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
db_impl_files.cc New API to get all merge operands for a Key (#5604) 2019-08-06 14:26:44 -07:00
db_impl_open.cc Persistent globally unique DB ID in manifest (#5725) 2019-09-03 08:52:24 -07:00
db_impl_readonly.cc Make format 2019-05-31 15:24:43 -07:00
db_impl_readonly.h Export Import sst files (#5495) 2019-07-17 12:27:14 -07:00
db_impl_secondary.cc Refactor trimming logic for immutable memtables (#5022) 2019-08-23 13:55:34 -07:00
db_impl_secondary.h Override check consistency for DBImplSecondary (#5469) 2019-06-17 15:39:55 -07:00
db_impl_write.cc Refactor trimming logic for immutable memtables (#5022) 2019-08-23 13:55:34 -07:00
db_impl.cc Persistent globally unique DB ID in manifest (#5725) 2019-09-03 08:52:24 -07:00
db_impl.h Adding DB::GetCurrentWalFile() API as a repliction/backup helper (#5765) 2019-09-04 12:10:17 -07:00
db_secondary_test.cc Fix a bug caused by secondary not skipping the beginning of new MANIFEST (#5472) 2019-06-18 11:21:37 -07:00