MDEV-18080, part#1: MyRocks is slow with log-bin=off
The cause for this was fix MDEV-15372, which was trying to speed up the parallel slave. Part#1: Do not attempt the "optimization" for transactions that are not replication slave workers.
This commit is contained in:
parent
e42192d7b3
commit
8fcd9478cc
@ -3750,6 +3750,10 @@ 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
|
||||||
*/
|
*/
|
||||||
|
if (thd->slave_thread)
|
||||||
|
{
|
||||||
|
// An attempt to make parallel slave performant (not fully successful,
|
||||||
|
// see MDEV-15372):
|
||||||
|
|
||||||
// First, commit without syncing. This establishes the commit order
|
// First, commit without syncing. This establishes the commit order
|
||||||
tx->set_sync(false);
|
tx->set_sync(false);
|
||||||
@ -3765,6 +3769,14 @@ static int rocksdb_commit(handlerton* hton, THD* thd, bool commit_tx)
|
|||||||
if (!s.ok())
|
if (!s.ok())
|
||||||
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
|
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Not a slave thread */
|
||||||
|
if (tx->commit()) {
|
||||||
|
DBUG_RETURN(HA_ERR_ROCKSDB_COMMIT_FAILED);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
We get here when committing a statement within a transaction.
|
We get here when committing a statement within a transaction.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user