MySQL 9.1.0
Source Code Documentation
replication_thread_status.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2021, 2024, 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 designed to work 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 either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License, version 2.0, for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
24
25#ifndef CHANGE_STREAM_REPLICATION_THREAD_STATUS_H_
26#define CHANGE_STREAM_REPLICATION_THREAD_STATUS_H_
27
28#include "sql/rpl_mi.h"
29
30/**
31 This method locks both (in this order)
32 mi->run_lock
33 rli->run_lock
34
35 @param mi The associated master info object
36
37 @note this method shall be invoked while locking mi->m_channel_lock
38 for writes. This is due to the mixed order in which these locks are released
39 and acquired in such method as the slave threads start and stop methods.
40*/
42
43/**
44 Unlock replica master and relay log info locks.
45
46 @param mi the repo info object that contains the lock
47*/
49
50/**
51 Find out which replications threads are running
52
53 @param mask Return value here
54 @param mi master_info for slave
55 @param inverse If set, returns which threads are not running
56 @param ignore_monitor_thread If set, ignores monitor io thread
57
58 IMPLEMENTATION
59 Get a bit mask for which threads are running.
60*/
61void init_thread_mask(int *mask, Master_info *mi, bool inverse,
62 bool ignore_monitor_thread = false);
63
64#endif /* CHANGE_STREAM_REPLICATION_THREAD_STATUS_H_ */
Definition: rpl_mi.h:87
static mi_bit_type mask[]
Definition: mi_packrec.cc:141
constexpr inverse_alphabet_type inverse(const alphabet_type &v)
inverse
Definition: base64.h:431
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:29
void unlock_slave_threads(Master_info *mi)
Unlock replica master and relay log info locks.
Definition: replication_thread_status.cc:40
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:48