diff options
author | guilhem@mysql.com <> | 2003-08-25 16:20:21 +0200 |
---|---|---|
committer | guilhem@mysql.com <> | 2003-08-25 16:20:21 +0200 |
commit | cc29458056cdf1b4ef4b0e25f034a707d59586f0 (patch) | |
tree | a7fce6fafd7df948f3623b418739a4e0c64bab8a /sql/slave.h | |
parent | 73fe41f997671424206de9d2fba0b817d45bec30 (diff) | |
download | mariadb-git-cc29458056cdf1b4ef4b0e25f034a707d59586f0.tar.gz |
comments about mutexes in replication.
Don't start the SQL slave thread with SQL_BIG_SELECTS;
it's better to inhibate max_join_size instead.
Diffstat (limited to 'sql/slave.h')
-rw-r--r-- | sql/slave.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sql/slave.h b/sql/slave.h index 19411aba497..67bf009763b 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -24,6 +24,30 @@ having to re-read the master updates. */ +/* + MUTEXES in replication: + + LOCK_active_mi: this is meant for multimaster, when we can switch from a + master to another. It protects active_mi. We don't care of it for the moment, + as active_mi never moves (it's created at startup and deleted at shutdown, and + not changed: it always points to the same MASTER_INFO struct), because we + don't have multimaster. So for the moment, mi does not move, and mi->rli does + not either. + + In MASTER_INFO: run_lock, data_lock + run_lock protects all information about the run state: slave_running, and the + existence of the I/O thread (to stop/start it, you need this mutex). + data_lock protects some moving members of the struct: counters (log name, + position) and relay log (MYSQL_LOG object). + + In RELAY_LOG_INFO: run_lock, data_lock + see MASTER_INFO + + In MYSQL_LOG: LOCK_log, LOCK_index of the binlog and the relay log + LOCK_log: when you write to it. LOCK_index: when you create/delete a binlog + (so that you have to update the .index file). +*/ + extern ulong slave_net_timeout, master_retry_count; extern MY_BITMAP slave_error_mask; extern bool use_slave_mask; |