multi source replication pdf

51
1 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th , 2014. | MySQL Labs : Multi Source Replication Venkatesh Duggirala MySQL Replication Team

Upload: mysql-user-camp

Post on 12-Jul-2015

178 views

Category:

Presentations & Public Speaking


1 download

TRANSCRIPT

Page 1: Multi source replication pdf

1 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

MySQL Labs : Multi Source Replication

Venkatesh Duggirala MySQL Replication Team

Page 2: Multi source replication pdf

2 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

Safe Harbour Statement

The following is intended to outline our general product direction. It is intended for

information purposes only, and may not be incorporated into any contract.

It is not a commitment to deliver any material, code, or functionality, and should not

be relied upon in making purchasing decisions. The development, release, and

timing of any features or functionality described for Oracle’s products remains at the

sole discretion of Oracle.

Page 3: Multi source replication pdf

3 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

MySQL Labs features are not fit for production.

They are provided solely for testing purposes, to try the latest bug fixes and generally to keep up with the development.

Please, do not use these binaries in production.

Instead, install them on a spare server.

If you are looking for production ready binaries, please visit MySQL Downloads.

Page 4: Multi source replication pdf

4 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

Agenda

Background: Why Use Replication?

Multi-source Replication

– Introduction

– Use cases

– Internals

– Monitoring

Reading More about Multi-source Replication

Page 5: Multi source replication pdf

5 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Redundancy: If master crashes, promote slave to master

C

B

A

Background: What is Replication Used For?

C

B

ACrash

C

B

A

B is thenew master

Uh Oh! Whew!

Page 6: Multi source replication pdf

6 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Read scale-out

M SS

S

S

M

write clients read clientsread clients

write clients

Morereads?More

slaves!

Background: What is Replication Used For?

Page 7: Multi source replication pdf

7 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

On-line Backup and Reporting

Background: What is Replication Used For?

M

S

write clients

business intelligent client apps reporting client apps big queries client apps

Page 8: Multi source replication pdf

8 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

M

S

Different types of Replication servers setup

1

Page 9: Multi source replication pdf

9 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

M

S

M

S1 S2

Different types of Replication servers setup

1 2

Page 10: Multi source replication pdf

10 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

M

S

M

S1 S2

M1

M2

S

Different types of Replication servers setup

1 2 3

Page 11: Multi source replication pdf

11 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

M

S

M

S1 S2

M1

M2

S

M1 M2

S

Different types of Replication servers setup

1 2 3 4

Page 12: Multi source replication pdf

12 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

M

M

M

M

MM

S

M

S1 S2

M1

M2

S

M1 M2

S

Different types of Replication servers setup

1 2 3 4 5

Page 13: Multi source replication pdf

13 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

Agenda

Background: Why Use Replication?

Multi-source Replication

– Introduction

– Use cases

– Internals

– Monitoring

Reading More about Multi-source Replication

Page 14: Multi source replication pdf

14 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Before Multi-source replication :● Time sharing replication, where a slave would connect to a master

for a particular time slice. ● Have a hierarchical replication, where a slave that is to receive

updates from the several masters is at the end of replication hierarchy. (Like, M1->M2->M3->Slave)

● Using several instances of mysqlbinlog + GTIDs.

Multi-source replication feature aims to:● Receive transactions (in the form of binary log events) from

several MySQL servers simultaneously via several communication channels.

● Apply these received transactions (will not do any conflict detection or resolution)

Page 15: Multi source replication pdf

15 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Multi-Source Replication: Introduction

A Slave can have more than one master.

S

M4

M1

M3

M2

Page 16: Multi source replication pdf

16 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

A Slave can have more than one master.

M1db1db1db1

Multi-Source Replication: Introduction

Page 17: Multi source replication pdf

17 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

A Slave can have more than one master.

M1

M2

db1db1db1

db2

Multi-Source Replication: Introduction

Page 18: Multi source replication pdf

18 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

A Slave can have more than one master.

M4

M1

M3

M2

db1db1db1

db4

db3

db2

Multi-Source Replication: Introduction

Page 19: Multi source replication pdf

19 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

A Slave can have more than one master.

S db1db1db1 db4db3db2

M4

M1

M3

M2

db1db1db1

db4

db3

db2

Multi-Source Replication: Introduction

Page 20: Multi source replication pdf

20 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

Agenda

Background: Why Use Replication?

Multi-source Replication

– Introduction

– Use cases

– Internals

– Monitoring

Reading More about Multi-source Replication

Page 21: Multi source replication pdf

21 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Business IntelligenceData analytics

Backupetc

SM2

M1

M3

Database 2

Database 3

Database 1, 2, 3

Database 1

Multi-Source Replication: Use CasesThe main use cases of Multi-source replication are related to data aggregation.

Page 22: Multi source replication pdf

22 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Multi-Source Replication: Use Cases

SM

M

M

Shard 2

Shard 3

Full table

Shard 1

The main use cases of Multi-source replication are related to data aggregation.

Page 23: Multi source replication pdf

23 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

Agenda

Background: Why Use Replication?

Multi-source Replication

– Introduction

– Use cases

– Internals

– Monitoring

Reading More about Multi-source Replication

Page 24: Multi source replication pdf

24 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Multi-Source Replication: More details..

S

M4

M1

M3

M2

Slave can have more than one master.

– Receive transactions from several MySQL servers simultaneously.

– Apply transactions from different masters simultaneously.

– No conflict detection or resolution.

Page 25: Multi source replication pdf

25 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Insert...

Insert...

B

binary log

Insert...

relay log

Insert...

A

binary log

Client

Network

Multi-Source Replication: What is a Channel?

Senderthread

Receiverthread Applier

thread

A channel is an an abstraction for a sender-receiver-applier path.

Channel

Page 26: Multi source replication pdf

26 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

S

relay log1M1 binary log Network

Multi-Source Replication: How Many Channels?

Number of channels on slave = Number of sources.

relay log2M2 binary log Network

relay log3M3 binary log Network

binary log

Page 27: Multi source replication pdf

27 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

relay log1M1 binary log Network

Multi-Source Replication: Slave Appliers

Each channel has its own single-threaded slave applier.

relay log2M2 binary log Network

relay log3M3 binary log Network

binary logS

Page 28: Multi source replication pdf

28 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

binary log

M1 binary log Network

Multi-Source Replication: Slave Appliers

Each channel can also have its own multi-threaded slave applier.

SM2

M3

Network relay log2

relay log3Network relay log3

binary log

binary log

relay log1

Page 29: Multi source replication pdf

29 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Adding / Configuring A Channel

Each channel can be configured individually.

To add or alter a channel configuration use:

CHANGE MASTER TO master_def …

FOR CHANNEL ”<channel_name>”

– Channel names are case insensitive

– Special chars are allowed

– maximum number of channels is 256

Page 30: Multi source replication pdf

30 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

FOR CHANNEL ”<channel_name>” clause is added for:– start slave [thread_type] FOR CHANNEL ”<channel_name>"

– stop slave [thread_type] FOR CHANNEL ”<channel_name>”

– reset slave [all] FOR CHANNEL ”<channel_name>”

– flush relay logs FOR CHANNEL ”<channel_name>”

– show relay log events FOR CHANNEL ”<channel_name>”

An extra argument added for functions like– MASTER_POS_WAIT(<binlog_file>, <binlog_pos>, <time_out>,

<channel_name>);

– WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS(<gtid_set>, <time_out>, <channel_name>);

Replication Commands on a Channel

Page 31: Multi source replication pdf

31 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

To make commands work on ALL CHANNELS

– START SLAVE [thread_type]

– STOP SLAVE [thread_type]

– SHOW SLAVE STATUS

– FLUSH RELAY LOGS

ER_SLAVE_MULTIPLE_CHANNELS_CMD(1964)– SHOW RELAYLOG EVENTS;

– CHANGE MASTER

– MASTER_POS_WAIT()

– WAIT_FOR_SQL_THREAD_AFTER_GTIDS()

Working With All Channels

Page 32: Multi source replication pdf

32 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Compatibility With Other Replication Features

Multi-Threaded Slaves Yes

Global Transaction Identifiers Yes

Semi-Synchronous Replication Yes*

Slave Repositories Yes*

Filters Yes*

Page 33: Multi source replication pdf

33 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Multi threaded slaves: slave_parallel_workers=k and M channels will have (k+1)*M applier threads running.

GTIDs: A requirement as is the case with (normal master-slave replication), is that all the masters and the slave should have GTID_MODE=ON.

Semi-Synchronous Replication: all the masters and the slave should be in semi sync mode

Filters: replication filters are global in the labs release, ie. the applier threads of all channels will rely on a single global filter.

Compatibility continued 2...

Page 34: Multi source replication pdf

34 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Slave Repositories:

Only TABLE repository is supported (Crash safe slave) --mysqld= --master_info_repository= TABLE; --mysqld= --relay_log_info_repository= TABLE;

Convert FILE repository to TABLE repository dynamically STOP SLAVE; SET GLOBAL master_info_repository= 'TABLE'; SET GLOBAL relay_log_info_repository= 'TABLE';

Compatibility continued 3...

Page 35: Multi source replication pdf

35 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Simple Setup

✔ Start 3 servers

Page 36: Multi source replication pdf

36 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Simple Setup

S

M2M1

13000 13001

13002

13001

✔ Start 3 servers , M1 (13000), M2 (13001), S (13002)

Page 37: Multi source replication pdf

37 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Simple Setup

S

M2M1

13000 13001

13002

13001

✔ Start 3 servers , M1 (13000), M2 (13001), S (13002) ✔ On Slave(S), > CHANGE MASTER TO MASTER_PORT=13000,..., FOR CHANNEL 'CHANNEL_M1';

✔CHANNEL_M1 is created

channel_m1

Page 38: Multi source replication pdf

38 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Simple Setup

S

M2M1

13000 13001

13002

13001

✔ Start 3 servers , M1 (13000), M2 (13001), S (13002) ✔ On Slave(S), > CHANGE MASTER TO MASTER_PORT=13000,..., FOR CHANNEL 'CHANNEL_M1';

✔CHANNEL_M1 is created

> START SLAVE FOR CHANNEL 'CHANNEL_M1'✔ I/O thread for CHANNEL_M1 will be created✔ M1's binary log (table t1 changes) will be retrieved by I/O thread and written to slave-relay-bin-channel_m1.00001 relay log

✔ SQL thread will start reading it from relay log and will start applying the data.

channel_m1

insert into t1(..)

master1-bin.000001

insert into t1(..)

Slave-relay-bin-channel_m1.000001

Page 39: Multi source replication pdf

39 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Simple Setup

S

M2M1

13000 13001

13002

13001

✔ Start 3 servers , M1 (13000), M2 (13001), S (13002) ✔ On Slave(S), > CHANGE MASTER TO MASTER_PORT=13000,..., FOR CHANNEL 'CHANNEL_M1';

✔CHANNEL_M1 is created

> START SLAVE FOR CHANNEL 'CHANNEL_M1'✔ I/O thread for CHANNEL_M1 will be created✔ M1's binary log (table t1 changes) will be retrieved by I/O thread and written to slave-relay-bin-channel_m1.00001 relay log

✔ SQL thread will start reading it from relay log and will start applying the data.

> CHANGE MASTER TO MASTER_PORT=13001,..., FOR CHANNEL 'CHANNEL_M2'

✔ CHANNEL_M2 is created

channel_m1 channel_m2

insert into t1(..)

master1-bin.000001

insert into t1(..)

Slave-relay-bin-channel_m1.000001

Page 40: Multi source replication pdf

40 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Simple Setup

S

M2M1

13000 13001

13002

13001

✔ Start 3 servers , M1 (13000), M2 (13001), S (13002) ✔ On Slave(S), > CHANGE MASTER TO MASTER_PORT=13000,..., FOR CHANNEL 'CHANNEL_M1';

✔CHANNEL_M1 is created

> START SLAVE FOR CHANNEL 'CHANNEL_M1'✔ I/O thread for CHANNEL_M1 will be created✔ M1's binary log (table t1 changes) will be retrieved by I/O thread and written to slave-relay-bin-channel_m1.00001 relay log

✔ SQL thread will start reading it from relay log and will start applying the data.

> CHANGE MASTER TO MASTER_PORT=13001,..., FOR CHANNEL 'CHANNEL_M2'

✔ CHANNEL_M2 is created

> START SLAVE FOR CHANNEL 'CHANNEL_M2'✔ I/O thread for CHANNEL_M2 will be created✔ M2's binary log (table t2 changes) will be retrieved by I/O thread and written to slave-relay-bin-channel_m2.00001 relay log

✔ SQL thread will start reading it from relay log and will start applying the data.

channel_m1 channel_m2

insert into t1(..)

master1-bin.000001

insert into t2(..)

master2-bin.000002

insert into t1(..) insert into t2(..)

Slave-relay-bin-channel_m1.000001

Slave-relay-bin-channel_m2.000001

Page 41: Multi source replication pdf

41 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Simple Setup

S

M2M1

13000 13001

13002

13001

✔ Start 3 servers , M1 (13000), M2 (13001), S (13002) ✔ On Slave(S), > CHANGE MASTER TO MASTER_PORT=13000,..., FOR CHANNEL 'CHANNEL_M1';

✔CHANNEL_M1 is created

> START SLAVE FOR CHANNEL 'CHANNEL_M1'✔ I/O thread for CHANNEL_M1 will be created✔ M1's binary log (table t1 changes) will be retrieved by I/O thread and written to slave-relay-bin-channel_m1.00001 relay log

✔ SQL thread will start reading it from relay log and will start applying the data.

> CHANGE MASTER TO MASTER_PORT=13001,..., FOR CHANNEL 'CHANNEL_M2'

✔ CHANNEL_M2 is created

> START SLAVE FOR CHANNEL 'CHANNEL_M2'✔ I/O thread for CHANNEL_M2 will be created✔ M2's binary log (table t2 changes) will be retrieved by I/O thread and written to slave-relay-bin-channel_m2.00001 relay log

✔ SQL thread will start reading it from relay log and will start applying the data.

channel_m1 channel_m2

insert into t1(..)insert into t1(..)

master1-bin.000001

insert into t2(..)insert into t2(..)

master2-bin.000002

insert into t1(..)insert into t1(..)

insert into t2(..)insert into t2(...)

Slave-relay-bin-channel_m1.000001

Slave-relay-bin-channel_m2.000001

Page 42: Multi source replication pdf

42 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

Agenda

Background: Why Use Replication?

Multi-source Replication

– Introduction

– Use cases

– Internals

– Monitoring

Reading More about Multi-source Replication

Page 43: Multi source replication pdf

43 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Replication Monitoring: P_S Replication Tables

Connection Configuration

Connection Status

Execution Configuration

Execution Status

Slave Status

Applier / CoordinatorStatus

WorkersStatus

Page 44: Multi source replication pdf

44 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

We have six performance schema tables for replication

– replication_connection_configuration

– replication_connection_status

– replication_execute_configuration

– replication_execute_status

– replication_execute_status_by_coordinator

– replication_execute_status_by_worker

Consistent semantics across tables. Lets explore one of them.

Replication Monitoring: P_S Replication Tables

One row per CHANNEL

One row per CHANNEL per WORKER

Page 45: Multi source replication pdf

4545 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

mysql> select * from performance_schema.replication_connection_status\G

*************************** 1. row ***************************CHANNEL_NAME : channel1SOURCE_UUID : 7cff7406-23ca-11e3-ac3e-5c260a83b12bTHREAD_ID : 13SERVICE_STATE : ONRECEIVED_TRANSACTION_SET : 7cff7406-23ca-11e3-ac3e-5c260a83b12b:1-4LAST_ERROR_NUMBER : 0LAST_ERROR_MESSAGE :LAST_ERROR_TIMESTAMP : 0000-00-00 00:00:00*************************** 2. row ***************************CHANNEL_NAME : channel2...

Replication Monitoring: Connection Status

One row per CHANNEL

Page 46: Multi source replication pdf

4646 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

mysql> select * from performance_schema.replication_connection_status\G

*************************** 1. row ***************************CHANNEL_NAME : channel1SOURCE_UUID : 7cff7406-23ca-11e3-ac3e-5c260a83b12bTHREAD_ID : 13SERVICE_STATE : ONRECEIVED_TRANSACTION_SET : 7cff7406-23ca-11e3-ac3e-5c260a83b12b:1-4LAST_ERROR_NUMBER : 0LAST_ERROR_MESSAGE :LAST_ERROR_TIMESTAMP : 0000-00-00 00:00:00*************************** 2. row ***************************CHANNEL_NAME : channel2...

Replication Monitoring: Connection Status

Receiver thread & its service state

Page 47: Multi source replication pdf

4747 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

mysql> select * from performance_schema.replication_connection_status\G

*************************** 1. row ***************************CHANNEL_NAME : channel1SOURCE_UUID : 7cff7406-23ca-11e3-ac3e-5c260a83b12bTHREAD_ID : 13SERVICE_STATE : ONRECEIVED_TRANSACTION_SET : 7cff7406-23ca-11e3-ac3e-5c260a83b12b:1-4LAST_ERROR_NUMBER : 0LAST_ERROR_MESSAGE :LAST_ERROR_TIMESTAMP : 0000-00-00 00:00:00*************************** 2. row ***************************CHANNEL_NAME : channel2...

Replication Monitoring: Connection Status

Set of transactions receivedthrough this channel

Page 48: Multi source replication pdf

4848 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

mysql> select * from performance_schema.replication_connection_status\G

*************************** 1. row ***************************CHANNEL_NAME : channel1SOURCE_UUID : 7cff7406-23ca-11e3-ac3e-5c260a83b12bTHREAD_ID : 13SERVICE_STATE : ONRECEIVED_TRANSACTION_SET : 7cff7406-23ca-11e3-ac3e-5c260a83b12b:1-4LAST_ERROR_NUMBER : 1045LAST_ERROR_MESSAGE : error connecting to master '[email protected]:13000' ...LAST_ERROR_TIMESTAMP : 2013-11-04 13:37:23*************************** 2. row ***************************CHANNEL_NAME : channel2...

Replication Monitoring: Connection Status

Oops! There was an error in the receiver thread on this channel

Page 49: Multi source replication pdf

4949 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

mysql> select * from performance_schema.replication_connection_status\G

*************************** 1. row ***************************CHANNEL_NAME : channel1SOURCE_UUID : 7cff7406-23ca-11e3-ac3e-5c260a83b12bTHREAD_ID : NULLSERVICE_STATE : OFFRECEIVED_TRANSACTION_SET : 7cff7406-23ca-11e3-ac3e-5c260a83b12b:1-4LAST_ERROR_NUMBER : 1045LAST_ERROR_MESSAGE : error connecting to master '[email protected]:13000' ...LAST_ERROR_TIMESTAMP : 2013-11-04 13:37:23*************************** 2. row ***************************CHANNEL_NAME : channel2...

Replication Monitoring: Connection Status

Receiver thread on this channel stopped serving...

Page 50: Multi source replication pdf

50 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17th, 2014. |

Agenda

Background: Why Use Replication?

Multi-source Replication

– Introduction

– Use cases

– Internals

– Monitoring

Reading More about Multi-source Replication

Page 51: Multi source replication pdf

51 | Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL User Camp| Bangalore, India, October 17 th, 2014. |

Read More About Multi Source Replication

Read more about Multi-source replication on Rith's blog: http://mysqlhighavailability.com/5-7-5-labs-multi-source-replication/

Read more about replication P_S tables on Shiv's blogs:http://shivjijha.blogspot.com/2013/09/Monitoring-Replication-with-the-NEW-performance-schema-tables.html

http://mysqlhighavailability.com/global-variables-in-rpl-ps/

Official MySQL documentation for replication P_S tables:http://dev.mysql.com/doc/refman/5.7/en/performance-schema-replication-tables.html

Read a feature preview of Multi-source replication on Rith's blog:http://on-mysql-replication.blogspot.in/2013/09/feature-preview-mysql-multi-source-replication.html