rocksdb/port/win
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
..
env_default.cc run make format for PR 3838 (#3954) 2018-06-05 12:58:02 -07:00
env_win.cc fix NowNanos overflow (#5062) 2019-03-21 15:18:36 -07:00
env_win.h fix NowNanos overflow (#5062) 2019-03-21 15:18:36 -07:00
io_win.cc Support pragma once in all header files and cleanup some warnings (#4339) 2018-09-05 18:13:31 -07:00
io_win.h Support for single-primary, multi-secondary instances (#4899) 2019-03-26 16:45:31 -07:00
port_win.cc Make adaptivity of LRU cache mutexes configurable (#5054) 2019-03-20 12:33:44 -07:00
port_win.h Make adaptivity of LRU cache mutexes configurable (#5054) 2019-03-20 12:33:44 -07:00
win_jemalloc.cc Reformatting some recent changes (#4161) 2018-07-20 14:43:38 -07:00
win_logger.cc Windows cumulative patch 2018-03-06 11:57:43 -08:00
win_logger.h Windows cumulative patch 2018-03-06 11:57:43 -08:00
win_thread.cc Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
win_thread.h Fix a race condition in WindowsThread (port::Thread) 2017-12-07 13:42:53 -08:00
xpress_win.cc Enable cacheline_aligned_alloc() to allocate from jemalloc if enabled. 2017-10-27 13:27:12 -07:00
xpress_win.h Change RocksDB License 2017-07-15 16:11:23 -07:00