Yi Wu e9e6e53247 Simplify write thread logic
Summary:
The concept about early exit in write thread implementation is a confusing one. It means that if early exit is allowed, batch group leader will not responsible to exit the batch group, but the last finished writer do. In case we need to mark log synced, or encounter memtable insert error, early exit is disallowed.

This patch remove such a concept by:
* In all cases, the last finished writer (not necessary leader) is responsible to exit batch group.
* In case of parallel memtable write, leader will also mark log synced after memtable insert and before signal finish (call `CompleteParallelWorker()`). The purpose is to allow mark log synced (which require locking mutex) can run in parallel to memtable insert in other writers.
* The last finish writer should handle memtable insert error (update bg_error_) before exiting batch group.
Closes https://github.com/facebook/rocksdb/pull/2134

Differential Revision: D4869667

Pulled By: yiwu-arbug

fbshipit-source-id: aec170847c85b90f4179d6a4608a4fe1361544e3
2017-04-13 16:12:04 -07:00
..
2017-02-06 14:54:18 -08:00
2017-04-07 10:54:12 -07:00
2017-04-05 17:24:19 -07:00
2017-03-13 11:54:10 -07:00
2017-04-13 16:12:04 -07:00
2017-04-13 16:12:04 -07:00
2017-03-13 09:54:11 -07:00
2017-03-13 09:54:11 -07:00
2017-04-04 18:09:11 -07:00
2017-03-28 12:09:12 -07:00
2016-07-08 17:50:51 -07:00
2016-10-13 08:48:40 -07:00
2016-07-08 17:50:51 -07:00
2016-11-03 18:54:20 -07:00
2016-12-29 15:54:19 -08:00
2017-02-16 10:39:13 -08:00
2017-02-06 14:54:18 -08:00
2016-07-13 15:36:22 -07:00
2017-04-13 16:12:04 -07:00
2017-04-13 16:12:04 -07:00