This PR applies DML events (events read from the binary logs) in batches, i.e. it aggregates events from the binary log and writes multiple DMLs (insert, delete, update) in a single transaction.
This has the potential to increase gh-ost's write capacity. This would potentially help #348, though we have not yet diagnosed #348 enough.
The PR introduces a --dml-batch-size flag, default 10.
Noteworthy about the implementation: gh-ost does not wait for events to arrive in order to batch. The logic is as follows:
So the logic doesn't block on waiting for "more events to arrive", but is greedy, and takes as many available events as there are, up to some limit, and only in suh case that there are events to apply.
Initial support for batching multiple DMLs when writing to ghost table
batching DML writes, configurable --dml-batch-size
Merge branch 'master' into batch-apply-dml-events
explicit rollback in ApplyDMLEventQueries()
bailing out from onApplyEventStruct()
handling a non-DML event at the end of a dml-event sequence
This was subjected to prod testing for the past days and behaves as expected; merging.