[MDEV-21305] Move replication specific assertion out of mdl Created: 2019-12-12  Updated: 2023-12-20

Status: Stalled
Project: MariaDB Server
Component/s: Replication
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Sergey Vojtovich Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

There's replication specific assertion in mdl.cc:

  /*
    Ensure that if we are trying to get an exclusive lock for a slave
    running parallel replication, then we are not blocked by another
    parallel slave thread that is not committed. This should never happen as
    the parallel replication scheduler should never schedule a DDL while
    DML's are still running.
  */
  DBUG_SLOW_ASSERT((mdl_request->type != MDL_INTENTION_EXCLUSIVE &&
                    mdl_request->type != MDL_EXCLUSIVE) ||
                   !(get_thd()->rgi_slave &&
                     get_thd()->rgi_slave->is_parallel_exec &&
                     lock->check_if_conflicting_replication_locks(this)));

Please trying moving it out to replication code. Needed for another InnoDB cleanup, where we want to remove THD from InnoDB background threads and use MDL_context instead.



 Comments   
Comment by Andrei Elkin [ 2020-06-23 ]

ralf.gebhardt@mariadb.com Since it's a developer's assert we could remove already in 10.5. Let us aim at that. And it's better done this way to tidy up the environment for further XA improvements hopefully in 10.6. That concerns MDL which are unfriendly to disconnected prepared XA, see MDEV-21602.

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