Commit d7129565 authored by Eugene Kosov's avatar Eugene Kosov Committed by Eugene Kosov

MDEV-19749 MDL scalability regression after backup locks

use ilist instread of I_P_List because it's generally
slightly faster on inserting, removing and iterating
parent e9c389c3
This diff is collapsed.
#ifndef MDL_H #ifndef MDL_H
#define MDL_H #define MDL_H
/* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. /* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2020, MariaDB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -16,6 +17,7 @@ ...@@ -16,6 +17,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
#include "sql_plist.h" #include "sql_plist.h"
#include "ilist.h"
#include <my_sys.h> #include <my_sys.h>
#include <m_string.h> #include <m_string.h>
#include <mysql_com.h> #include <mysql_com.h>
...@@ -685,7 +687,7 @@ class MDL_wait_for_subgraph ...@@ -685,7 +687,7 @@ class MDL_wait_for_subgraph
threads/contexts. threads/contexts.
*/ */
class MDL_ticket : public MDL_wait_for_subgraph class MDL_ticket : public MDL_wait_for_subgraph, public ilist_node<>
{ {
public: public:
/** /**
...@@ -694,15 +696,9 @@ class MDL_ticket : public MDL_wait_for_subgraph ...@@ -694,15 +696,9 @@ class MDL_ticket : public MDL_wait_for_subgraph
*/ */
MDL_ticket *next_in_context; MDL_ticket *next_in_context;
MDL_ticket **prev_in_context; MDL_ticket **prev_in_context;
/**
Pointers for participating in the list of satisfied/pending requests
for the lock. Externally accessible.
*/
MDL_ticket *next_in_lock;
MDL_ticket **prev_in_lock;
public: public:
#ifdef WITH_WSREP #ifdef WITH_WSREP
void wsrep_report(bool debug); void wsrep_report(bool debug) const;
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
bool has_pending_conflicting_lock() const; bool has_pending_conflicting_lock() const;
......
/* Copyright 2008-2015 Codership Oy <http://www.codership.com> /* Copyright 2008-2015 Codership Oy <http://www.codership.com>
Copyright (c) 2020, MariaDB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -2368,7 +2369,7 @@ void wsrep_to_isolation_end(THD *thd) ...@@ -2368,7 +2369,7 @@ void wsrep_to_isolation_end(THD *thd)
*/ */
void wsrep_handle_mdl_conflict(MDL_context *requestor_ctx, void wsrep_handle_mdl_conflict(MDL_context *requestor_ctx,
MDL_ticket *ticket, const MDL_ticket *ticket,
const MDL_key *key) const MDL_key *key)
{ {
/* Fallback to the non-wsrep behaviour */ /* Fallback to the non-wsrep behaviour */
......
/* Copyright 2008-2017 Codership Oy <http://www.codership.com> /* Copyright 2008-2017 Codership Oy <http://www.codership.com>
Copyright (c) 2020, MariaDB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -527,7 +528,7 @@ void wsrep_keys_free(wsrep_key_arr_t* key_arr); ...@@ -527,7 +528,7 @@ void wsrep_keys_free(wsrep_key_arr_t* key_arr);
extern void extern void
wsrep_handle_mdl_conflict(MDL_context *requestor_ctx, wsrep_handle_mdl_conflict(MDL_context *requestor_ctx,
MDL_ticket *ticket, const MDL_ticket *ticket,
const MDL_key *key); const MDL_key *key);
enum wsrep_thread_type { enum wsrep_thread_type {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment