[MDEV-31062] Reduce number of wsrep calls to server code from InnoDB Created: 2023-04-17  Updated: 2024-02-06

Status: In Progress
Project: MariaDB Server
Component/s: Galera
Fix Version/s: 10.4

Type: Task Priority: Critical
Reporter: Jan Lindström Assignee: Julius Goryavsky
Resolution: Unresolved Votes: 0
Labels: None


 Description   

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



 Comments   
Comment by Jan Lindström [ 2023-04-17 ]
Comment by Marko Mäkelä [ 2023-04-17 ]

I posted some review comments to the 10.4 version. I think that some consistency checks need to be executed in trx_t::assert_freed().

Comment by Jan Lindström [ 2023-04-17 ]

Addressed review comments on

Comment by Jan Lindström [ 2023-04-18 ]

sysprg Addressed review comments on:

Generated at Thu Feb 08 10:20:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.