[MDEV-24923] Port selected Galera conflict resolution changes from 10.6 Created: 2021-02-19  Updated: 2021-05-03  Resolved: 2021-03-30

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.2.38, 10.3.29, 10.4.19, 10.5.10

Type: Bug Priority: Critical
Reporter: Jan Lindström (Inactive) Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-23328 Server hang due to Galera lock confli... Closed
relates to MDEV-25378 MariaDB 10.4.18 (galera) crash Closed
relates to MDEV-25427 InnoDB: Conflicting lock on table crash Closed
relates to MDEV-25579 MariaDB 10.4.18 crashes with InnoDB: ... Closed
relates to MDEV-25170 Mariadb/Galera crashes after FreeSWIT... Closed
relates to MDEV-25266 Port Galera cleanups done in MDEV-249... Closed

 Description   

Selected changes:

  • Add condition on trx->state == TRX_STATE_COMMITTED_IN_MEMORY in order to avoid unnecessary work. If a transaction has already been committed or rolled back, it will release its locks in lock_release() and let the waiting thread(s) continue execution.
  • Let BF wait on lock_rec_has_to_wait


 Comments   
Comment by Jan Lindström (Inactive) [ 2021-03-22 ]

These are tested on bb-10.x-galera branches as it has wider test scope.

Comment by Jan Lindström (Inactive) [ 2021-03-25 ]

Rebased and applied review comments to

Comment by Jan Lindström (Inactive) [ 2021-03-25 ]

Review addressed in

Comment by Jan Lindström (Inactive) [ 2021-03-26 ]
Comment by Jan Lindström (Inactive) [ 2021-03-28 ]
Comment by Jan Lindström (Inactive) [ 2021-03-29 ]
Comment by Marko Mäkelä [ 2021-03-29 ]

Thank you, it looks OK now.

Comment by Marko Mäkelä [ 2021-03-31 ]

The proposed 10.3 version would have invoked wsrep_thd_UNLOCK(thd) twice in a row in a rarely executed code path of bg_wsrep_kill_trx(). I corrected that on merge to 10.3. This is now merged up to 10.5. The merge to 10.6 will include some cleanup of wsrep_assert_no_bf_bf_wait().

Generated at Thu Feb 08 09:33:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.