Commit 01e89d6a authored by Sergei Petrunia's avatar Sergei Petrunia

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.
parent a128fe43
...@@ -3154,10 +3154,20 @@ static int rocksdb_commit(handlerton* hton, THD* thd, bool commit_tx) ...@@ -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 COMMIT statement that finishes a multi-statement transaction
- For a statement that has its own 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()) { if (tx->commit()) {
DBUG_RETURN(HA_ERR_ROCKSDB_COMMIT_FAILED); DBUG_RETURN(HA_ERR_ROCKSDB_COMMIT_FAILED);
} }
thd_wakeup_subsequent_commits(thd, 0); 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 { } else {
/* /*
We get here when committing a statement within a transaction. We get here when committing a statement within a transaction.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment