Yanqin Jin
9358178edc
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
2019-03-26 16:45:31 -07:00
..
2019-03-18 12:15:34 -07:00
2019-03-18 12:15:34 -07:00
2018-12-13 14:21:24 -08:00
2019-03-19 09:43:22 -07:00
2019-02-14 14:41:36 -08:00
2019-01-18 19:12:57 -08:00
2019-01-02 11:42:54 -08:00
2019-02-14 14:41:36 -08:00
2018-10-08 22:54:43 -07:00
2018-12-07 17:06:02 -08:00
2017-08-19 14:10:08 -07:00
2019-02-14 14:41:36 -08:00
2019-02-11 15:01:46 -08:00
2019-02-07 16:57:33 -08:00
2019-02-14 14:41:36 -08:00
2019-03-19 17:28:19 -07:00
2019-03-19 17:28:19 -07:00
2019-03-19 17:28:19 -07:00
2019-02-15 09:51:41 -08:00
2018-11-29 16:04:52 -08:00
2019-02-14 14:41:36 -08:00
2019-02-28 10:27:59 -08:00
2018-05-29 15:44:34 -07:00
2018-11-29 16:04:52 -08:00
2018-11-29 16:04:52 -08:00
2019-02-14 11:23:55 -08:00
2018-10-09 15:19:38 -07:00
2019-02-14 14:41:36 -08:00
2018-11-09 11:19:58 -08:00
2019-02-14 14:41:36 -08:00
2019-02-14 14:41:36 -08:00
2019-02-14 14:41:36 -08:00
2017-10-17 08:57:09 -07:00
2019-02-14 14:41:36 -08:00
2019-02-19 12:15:39 -08:00
2019-02-14 14:41:36 -08:00
2019-03-25 19:18:04 -07:00
2018-11-12 16:42:16 -08:00
2018-11-09 11:19:58 -08:00
2018-11-12 12:24:26 -08:00
2018-12-13 15:12:40 -08:00
2019-03-25 19:18:04 -07:00
2019-02-20 15:52:54 -08:00
2018-08-03 17:42:34 -07:00
2018-11-13 11:32:16 -08:00
2019-03-26 16:45:31 -07:00
2019-02-28 10:27:59 -08:00
2018-12-13 14:21:24 -08:00
2019-03-26 16:45:31 -07:00
2019-03-26 16:45:31 -07:00
2019-03-15 15:19:25 -07:00
2019-03-26 16:45:31 -07:00
2019-03-26 16:45:31 -07:00
2018-10-09 17:15:51 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-10-29 14:36:31 -07:00
2018-05-21 14:43:11 -07:00
2019-02-14 14:41:36 -08:00
2019-03-26 16:32:13 -07:00
2018-12-17 17:33:46 -08:00
2019-02-26 16:56:19 -08:00
2019-02-14 14:41:36 -08:00
2019-02-14 14:41:36 -08:00
2019-02-26 16:56:19 -08:00
2019-02-20 15:52:54 -08:00
2019-02-15 09:51:41 -08:00
2019-02-14 14:41:36 -08:00
2019-03-26 16:45:31 -07:00
2019-02-14 14:41:36 -08:00
2019-03-01 10:42:09 -08:00
2018-09-20 15:15:28 -07:00
2018-07-17 14:43:18 -07:00
2019-03-26 16:32:13 -07:00
2019-02-07 16:15:27 -08:00
2019-02-07 16:15:27 -08:00
2019-03-01 10:42:09 -08:00
2019-02-14 14:41:36 -08:00
2018-12-28 18:02:28 -08:00
2019-03-15 15:19:25 -07:00
2018-07-13 17:42:38 -07:00
2018-08-06 18:27:44 -07:00
2019-03-21 09:55:09 -07:00
2018-07-13 17:27:39 -07:00
2018-09-17 13:14:07 -07:00
2018-10-04 20:46:50 -07:00
2018-10-04 20:46:50 -07:00
2018-09-15 13:43:04 -07:00
2018-09-15 13:43:04 -07:00
2018-04-12 17:59:16 -07:00
2019-02-14 14:41:36 -08:00
2019-03-19 17:28:19 -07:00
2019-02-12 19:16:17 -08:00
2019-02-19 12:15:39 -08:00
2019-02-14 14:41:36 -08:00
2019-02-14 14:41:36 -08:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2019-03-19 17:28:19 -07:00
2019-03-19 17:28:19 -07:00
2019-03-19 17:28:19 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-07-13 17:27:39 -07:00
2019-02-14 14:41:36 -08:00
2018-03-05 13:13:41 -08:00
2019-02-20 15:52:54 -08:00
2019-02-20 15:52:54 -08:00
2019-03-19 17:28:19 -07:00
2019-03-19 17:28:19 -07:00
2019-01-15 21:34:38 -08:00
2019-02-14 14:41:36 -08:00
2018-08-24 18:13:20 -07:00
2019-03-26 16:45:31 -07:00
2019-03-26 16:45:31 -07:00
2019-03-26 16:45:31 -07:00
2018-05-14 10:57:56 -07:00
2018-11-09 11:19:58 -08:00
2018-05-03 15:43:09 -07:00
2018-05-03 15:43:09 -07:00
2019-01-03 16:30:12 -08:00
2017-07-15 16:11:23 -07:00
2019-02-14 14:41:36 -08:00
2019-02-14 14:41:36 -08:00
2019-02-13 18:33:42 -08:00
2019-01-31 14:49:51 -08:00
2019-02-19 12:15:39 -08:00
2019-02-19 12:15:39 -08:00
2018-12-17 17:33:46 -08:00
2019-02-14 14:41:36 -08:00
2019-02-28 10:27:59 -08:00
2018-12-17 17:33:46 -08:00
2017-07-15 16:11:23 -07:00
2019-02-14 14:41:36 -08:00
2018-08-03 13:57:40 -07:00
2018-07-13 17:27:39 -07:00
2019-03-26 16:32:13 -07:00
2017-07-15 16:11:23 -07:00
2019-03-01 15:45:45 -08:00
2019-02-28 15:49:11 -08:00
2019-02-14 14:41:36 -08:00
2018-12-19 13:29:51 -08:00
2018-12-17 17:33:46 -08:00
2018-12-19 15:45:37 -08:00
2018-12-18 14:28:42 -08:00
2018-12-11 12:10:48 -08:00
2018-12-17 13:20:51 -08:00
2018-12-17 13:20:51 -08:00
2019-02-26 16:56:19 -08:00
2018-10-12 10:41:54 -07:00
2019-03-26 16:45:31 -07:00
2019-01-16 09:55:32 -08:00
2017-07-15 16:11:23 -07:00
2019-01-09 16:25:42 -08:00
2018-12-20 12:03:44 -08:00
2018-12-28 18:02:28 -08:00
2019-03-18 12:15:34 -07:00
2019-03-18 12:15:34 -07:00
2019-03-18 12:15:34 -07:00
2019-03-26 16:45:31 -07:00
2018-11-09 11:19:58 -08:00
2019-02-19 13:39:49 -08:00
2019-03-26 16:45:31 -07:00
2019-03-26 16:45:31 -07:00
2019-02-11 11:20:24 -08:00
2019-02-08 11:33:11 -08:00
2019-03-26 16:45:31 -07:00
2019-02-19 13:39:49 -08:00
2019-03-26 16:45:31 -07:00
2019-03-26 16:45:31 -07:00
2018-11-09 11:19:58 -08:00
2019-03-26 16:45:31 -07:00
2018-01-11 18:57:33 -08:00
2017-07-15 16:11:23 -07:00
2018-06-28 18:58:29 -07:00
2019-02-19 13:39:49 -08:00
2019-02-19 13:39:49 -08:00
2019-02-19 13:39:49 -08:00
2017-07-15 16:11:23 -07:00
2019-02-19 13:39:49 -08:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-11-07 14:07:53 -08:00
2019-01-03 12:40:42 -08:00