Nathan Bronson 6ce42dd075 Don't merge WriteBatch-es if WAL is disabled
Summary:
There's no need for WriteImpl to flatten the write batch group
into a single WriteBatch if the WAL is disabled.  This diff moves the
flattening into the WAL step, and skips flattening entirely if it isn't
needed.  It's good for about 5% speedup on a multi-threaded workload
with no WAL.

This diff also adds clarifying comments about the chance for partial
failure of WriteBatchInternal::InsertInto, and always sets bg_error_ if
the memtable state diverges from the logged state or if a WriteBatch
succeeds only partially.

Benchmark for speedup:
  db_bench -benchmarks=fillrandom -threads=16 -batch_size=1 -memtablerep=skip_list -value_size=0 --num=200000 -level0_slowdown_writes_trigger=9999 -level0_stop_writes_trigger=9999 -disable_auto_compactions --max_write_buffer_number=8 -max_background_flushes=8 --disable_wal --write_buffer_size=160000000

Test Plan: asserts + make check

Reviewers: sdong, igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D50583
2015-11-12 10:50:38 -08:00
..
2015-07-17 18:59:11 +02:00
2015-07-20 17:20:40 -07:00
2015-09-17 11:42:56 -07:00
2015-07-20 17:20:40 -07:00
2015-04-23 12:10:36 -07:00
2015-03-17 14:08:00 -07:00
2015-01-26 11:48:07 -08:00
2015-07-07 12:10:10 -07:00
2015-08-05 07:33:27 -07:00
2015-03-17 14:08:00 -07:00
2015-08-06 17:59:05 -07:00
2014-11-10 17:39:38 -05:00
2015-09-17 11:42:56 -07:00
2015-11-10 16:56:06 -08:00
2015-05-29 14:36:35 -07:00