Revision 58b12dfe37784ce1bd67a03643147ab94f590451 authored by Reid Horuff on 06 March 2017, 23:04:36 UTC, committed by Facebook Github Bot on 06 March 2017, 23:09:11 UTC
Summary:
Relating to #1903:

In MaybeFlushColumnFamilies() we want to modify the 'getting_flushed' flag before releasing the db mutex when SwitchMemtable() is called.

The following 2 actions need to be atomic in MaybeFlushColumnFamilies()
- getting_flushed is false on oldest log
- we determine that all CFs can be flushed to successfully release oldest log
- we set getting_flushed = true on the oldest log.
-------
- getting_flushed is false on oldest log
- we determine that all CFs can NOT be flushed to successfully release oldest log
- we set unable_to_flush_oldest_log_ = true on the oldest log.

#### In the 2pc case:

T1 enters function but is unable to flush all CFs to release log
T1 sets unable_to_flush_oldest_log_ = true
T1 begins flushing all CFs possible

T2 enters function but is unable to flush all CFs to release log
T2 sees unable_to_flush_oldes_log_ has been set so exits

T3 enters function and will be able to flush all CFs to release oldest log
T3 sets getting_flushed = true on oldes
Closes https://github.com/facebook/rocksdb/pull/1909

Differential Revision: D4646235

Pulled By: reidHoruff

fbshipit-source-id: c8d0447
1 parent f8a4ea0
History
File Mode Size
win
README -rw-r--r-- 405 bytes
dirent.h -rw-r--r-- 1.2 KB
likely.h -rw-r--r-- 788 bytes
port.h -rw-r--r-- 872 bytes
port_example.h -rw-r--r-- 3.7 KB
port_posix.cc -rw-r--r-- 4.7 KB
port_posix.h -rw-r--r-- 5.2 KB
stack_trace.cc -rw-r--r-- 3.5 KB
stack_trace.h -rw-r--r-- 686 bytes
sys_time.h -rw-r--r-- 1.3 KB
util_logger.h -rw-r--r-- 981 bytes
xpress.h -rw-r--r-- 725 bytes

README

back to top