MySQL 8.0.33
Source Code Documentation
replication_thread_status.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2021, 2023, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is also distributed with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have included with MySQL.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef CHANGE_STREAM_REPLICATION_THREAD_STATUS_H_
25#define CHANGE_STREAM_REPLICATION_THREAD_STATUS_H_
26
27#include "sql/rpl_mi.h"
28
29/**
30 This method locks both (in this order)
31 mi->run_lock
32 rli->run_lock
33
34 @param mi The associated master info object
35
36 @note this method shall be invoked while locking mi->m_channel_lock
37 for writes. This is due to the mixed order in which these locks are released
38 and acquired in such method as the slave threads start and stop methods.
39*/
41
42/**
43 Unlock replica master and relay log info locks.
44
45 @param mi the repo info object that contains the lock
46*/
48
49/**
50 Find out which replications threads are running
51
52 @param mask Return value here
53 @param mi master_info for slave
54 @param inverse If set, returns which threads are not running
55 @param ignore_monitor_thread If set, ignores monitor io thread
56
57 IMPLEMENTATION
58 Get a bit mask for which threads are running.
59*/
60void init_thread_mask(int *mask, Master_info *mi, bool inverse,
61 bool ignore_monitor_thread = false);
62
63#endif /* CHANGE_STREAM_REPLICATION_THREAD_STATUS_H_ */
Definition: rpl_mi.h:86
static mi_bit_type mask[]
Definition: mi_packrec.cc:140
constexpr inverse_alphabet_type inverse(const alphabet_type &v)
inverse
Definition: base64.h:398
void lock_slave_threads(Master_info *mi)
This method locks both (in this order) mi->run_lock rli->run_lock.
Definition: replication_thread_status.cc:28
void unlock_slave_threads(Master_info *mi)
Unlock replica master and relay log info locks.
Definition: replication_thread_status.cc:39
void init_thread_mask(int *mask, Master_info *mi, bool inverse, bool ignore_monitor_thread=false)
Find out which replications threads are running.
Definition: replication_thread_status.cc:47