Yi Wu 32604e6601 Fix flush not being commit while writing manifest
Summary:
Fix flush not being commit while writing manifest, which is a recent bug introduced by D60075.

The issue:
# Options.max_background_flushes > 1
# Background thread A pick up a flush job, flush, then commit to manifest. (Note that mutex is released before writing manifest.)
# Background thread B pick up another flush job, flush. When it gets to `MemTableList::InstallMemtableFlushResults`, it notices another thread is commiting, so it quit.
# After the first commit, thread A doesn't double check if there are more flush result need to commit, leaving the second flush uncommitted.

Test Plan: run the test. Also verify the new test hit deadlock without the fix.

Reviewers: sdong, igor, lightmark

Reviewed By: lightmark

Subscribers: andrewkr, omegaga, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D60969
2016-07-21 10:10:41 -07:00
..
2016-05-17 13:11:56 -07:00
2016-05-17 13:11:56 -07:00
2016-06-09 19:03:10 -07:00
2016-07-08 17:50:51 -07:00
2016-07-08 17:50:51 -07:00
2016-07-08 17:50:51 -07:00
2016-07-13 15:36:22 -07:00
2016-06-25 08:29:40 +01:00