mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
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:
parent
a128fe4346
commit
01e89d6a86
1 changed files with 10 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue