MDEV-15372: Parallel slave speedup very limited when log_slave_updates=OFF

Make MyRocks' non-XA commit path to first do the commit without syncing
and then sync.
This commit is contained in:
Sergei Petrunia 2018-02-21 15:42:34 +03:00
commit 01e89d6a86

View file

@ -3154,10 +3154,20 @@ static int rocksdb_commit(handlerton* hton, THD* thd, bool commit_tx)
- For a COMMIT statement that finishes a multi-statement transaction
- For a statement that has its own transaction
*/
// First, commit without syncing. This establishes the commit order
tx->set_sync(false);
if (tx->commit()) {
DBUG_RETURN(HA_ERR_ROCKSDB_COMMIT_FAILED);
}
thd_wakeup_subsequent_commits(thd, 0);
if (rocksdb_flush_log_at_trx_commit == FLUSH_LOG_SYNC)
{
rocksdb::Status s= rdb->FlushWAL(true);
if (!s.ok())
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
}
} else {
/*
We get here when committing a statement within a transaction.