summaryrefslogtreecommitdiff
path: root/src.mk
diff options
context:
space:
mode:
authorYanqin Jin <yanqin@fb.com>2019-03-26 16:41:31 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-03-26 16:45:31 -0700
commit9358178edc584102f644eaf281ef2cc4676dda09 (patch)
tree1d10f244c5aedb2d9512f093ebda617abfc70d43 /src.mk
parent2a5463ae8497a122ea91f74a8604da17ab60557b (diff)
Support for single-primary, multi-secondary instances (#4899)
Summary: This PR allows RocksDB to run in single-primary, multi-secondary process mode. The writer is a regular RocksDB (e.g. an `DBImpl`) instance playing the role of a primary. Multiple `DBImplSecondary` processes (secondaries) share the same set of SST files, MANIFEST, WAL files with the primary. Secondaries tail the MANIFEST of the primary and apply updates to their own in-memory state of the file system, e.g. `VersionStorageInfo`. This PR has several components: 1. (Originally in #4745). Add a `PathNotFound` subcode to `IOError` to denote the failure when a secondary tries to open a file which has been deleted by the primary. 2. (Similar to #4602). Add `FragmentBufferedReader` to handle partially-read, trailing record at the end of a log from where future read can continue. 3. (Originally in #4710 and #4820). Add implementation of the secondary, i.e. `DBImplSecondary`. 3.1 Tail the primary's MANIFEST during recovery. 3.2 Tail the primary's MANIFEST during normal processing by calling `ReadAndApply`. 3.3 Tailing WAL will be in a future PR. 4. Add an example in 'examples/multi_processes_example.cc' to demonstrate the usage of secondary RocksDB instance in a multi-process setting. Instructions to run the example can be found at the beginning of the source code. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4899 Differential Revision: D14510945 Pulled By: riversand963 fbshipit-source-id: 4ac1c5693e6012ad23f7b4b42d3c374fecbe8886
Diffstat (limited to 'src.mk')
-rw-r--r--src.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/src.mk b/src.mk
index 728332905..55b4e3427 100644
--- a/src.mk
+++ b/src.mk
@@ -22,6 +22,7 @@ LIB_SOURCES = \
db/db_impl_files.cc \
db/db_impl_open.cc \
db/db_impl_readonly.cc \
+ db/db_impl_secondary.cc \
db/db_impl_write.cc \
db/db_info_dumper.cc \
db/db_iter.cc \
@@ -279,6 +280,7 @@ MAIN_SOURCES = \
db/db_options_test.cc \
db/db_properties_test.cc \
db/db_range_del_test.cc \
+ db/db_secondary_test.cc \
db/db_sst_test.cc \
db/db_statistics_test.cc \
db/db_table_properties_test.cc \