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
File | Mode | Size |
---|---|---|
env_default.cc | -rw-r--r-- | 1.3 KB |
env_win.cc | -rw-r--r-- | 29.5 KB |
env_win.h | -rw-r--r-- | 8.4 KB |
io_win.cc | -rw-r--r-- | 32.2 KB |
io_win.h | -rw-r--r-- | 16.4 KB |
port_win.cc | -rw-r--r-- | 7.0 KB |
port_win.h | -rw-r--r-- | 6.4 KB |
win_logger.cc | -rw-r--r-- | 4.4 KB |
win_logger.h | -rw-r--r-- | 1.5 KB |
win_thread.cc | -rw-r--r-- | 3.8 KB |
win_thread.h | -rw-r--r-- | 3.6 KB |
xpress_win.cc | -rw-r--r-- | 6.5 KB |
xpress_win.h | -rw-r--r-- | 791 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...