8394278...
by
=?utf-8?q?Jan_Lindstr=C3=B6m?= <email address hidden>
MDEV-31062 : Reduce number of wsrep calls to server code from InnoDB
Thread executing wsrep transaction can't change during transaction
execution. Similarly, thread executing high priority brute force
(BF) transaction does not change during transaction execution.
Therefore, in both cases there is no need to call server
code after transaction has initialized.
InnoDB already stores information is this wsrep transaction to
trx_t::wsrep and this is checked using trx->is_wsrep() function.
Because, brute force transaction is always a wsrep transaction
we can extend trx_t::wsrep variable so that value
0 == not wsrep transaction (and not BF)
1 == normal wsrep transaction
2 == high priority BF wsrep transaction
4 == high priority BF transaction is performing unique secondary index scan
These values can be set by calling server code on innobase_trx_init().
After that we can use trx_t::is_wsrep() and new function
introduced in this patch trx_t::is_wsrep_BF(). Unique
secondary index scan is determined later but it implies BF,
so this patch removes unnecessary variable trx_t::wsrep_UK_scan.
Patch introduces new functions trx_t::is_wsrep_UK_scan(),
wsrep_begin_UK_scan() and wsrep_end_UK_scan() to handle
unique secondary index scan.
This change reduces number of calls to server code from InnoDB and
reduces code bloat on performance critical stages like acquiring
record locks. Furthermore, it simplifies code on several locations.
This patch also removes unnecessary trx_t::wsrep_event that
was always set to NULL and not used.
Signed-off-by: Julius Goryavsky <email address hidden>
0c6c5a0...
by
=?utf-8?q?Jan_Lindstr=C3=B6m?= <email address hidden>
MDEV-29775 : Assertion `0' failed in void Protocol::end_statement() when adding data to the MyISAM table after setting wsrep_mode=replicate_myisam
Firstly, variables wsrep_forced_binlog_format, wsrep_replicate_myisam
should not be able to set if wsrep_on=OFF.
Secondly, if wsrep_replicate_myisam=ON we allow wsrep_forced_binlog_format
to be [DEFAULT|ROW].
Signed-off-by: Julius Goryavsky <email address hidden>
35ce03d...
by
=?utf-8?q?Jan_Lindstr=C3=B6m?= <email address hidden>
Problem was that if wsrep_load_data_splitting was used
streaming replication (SR) parameters were set
for MyISAM table. Galera does not currently support SR for
MyISAM.
Fix is to ignore wsrep_load_data_splitting setting (with
warning) if table is not InnoDB table.
This fix applies to 10.4-10.5.
Signed-off-by: Julius Goryavsky <email address hidden>
is_file_on_ssd() is more expensive than it should be.
It caches the results by volume name, but still calls GetVolumePathName()
every time, which, as procmon shows, opens multiple directories in
filesystem hierarchy (db directory, datadir, and all ancestors)
The fix is to cache SSD status by volume serial ID, which is cheap to
retrieve with GetFileInformationByHandleEx()
MDEV-30165 X-lock on supremum for prepared transaction for RR
trx_t::set_skip_lock_inheritance() must be invoked at the very beginning
of lock_release_on_prepare(). Currently trx_t::set_skip_lock_inheritance()
is invoked at the end of lock_release_on_prepare() when lock_sys and trx
are released, and there can be a case when locks on prepare are released,
but "not inherit gap locks" bit has not yet been set, and page split
inherits lock to supremum.
Also reset supremum bit and rebuild waiting queue when XA is prepared.