SlideShare a Scribd company logo
1 of 47
Download to read offline
The MySQL Availability Company
Tungsten Cluster Master Class
Basics: Working with Command Line Tools
Chris Parker, Customer Success Director, EMEA & APAC
Topics
In this short course, we will
• Re-cap the previous Installation
• Explore the main Command Line Tools
• tpm
• cctrl
• trepctl
• thl
Installation Re-Cap
Tungsten Cluster
Standalone Cluster
• Minimum 3 nodes
• 1 Primary
• 2 Replicas
• Odd number of nodes
• Single datacenter/region
Command Line Tools
tpm
• Tungsten Package Manager
• As well as using tpm for installs and updates, it can also be used for a number of other actions. You
can issue tpm help for a list of possible options.
• Most common options:
• tools/tpm validate[-update]
• [tools/]tpm update [--replace-release] [--no-connectors]
• tools/tpm install
• tpm diag – Gathers package of stats for support!
• tpm connector – Launches the MySQL command-line client and connects to the current
Primary node via locally-running Connector process
• tpm mysql – Launches the MySQL command-line client and connects to the MySQL server
process running on the local host
tpm connector
• Simple and quick way to connect to the current MySQL Primary node via the command line
• Only works on hosts where the Connector is running
• Will authenticate using credential supplied via application-user and application-password properties
• Provides additional commands to query database and cluster stats:
• Connector-based Tungsten commands are NOT available in Bridge Mode
• This is a good way to tell if you are in Bridge mode – if no commands are available, then you are in Bridge mode
• `tungsten help` will show all commands available
mysql> tungsten help;
+---------------------------------------------------------------------------------------------------------------------------------+
| Message |
+---------------------------------------------------------------------------------------------------------------------------------+
| tungsten connection status: display information about the connection used for the last request ran |
| tungsten connection count: gives the count of current connections to each one of the cluster datasources |
| tungsten cluster status: prints detailed information about the cluster view this connector has |
| tungsten show [full] processlist: list all running queries handled by this connector instance |
| tungsten show variables [like '<string>']: list connector configuration options in use. The <string> may contain '%' wildcards |
| tungsten flush privileges: reload user.map and refresh user credentials |
| tungsten mem info: display memory information about current JVM |
| tungsten gc: calls garbage collector |
| tungsten help: display this help message |
+---------------------------------------------------------------------------------------------------------------------------------+
9 rows in set (0.00 sec)
cctrl
• cctrl stands for Cluster Control
• Can be executed from any node running the manager in the cluster. For example, running cctrl
on a Connector-only host will fail.
• Allows control of all nodes in the cluster
• Main uses are
• Check cluster state
• Isolate nodes for maintenance
• Switch Primary nodes
• Recover nodes following failure/recovery
• Perform backup/recovery operations
• Requires the Manager to be running
cctrl
help
• Outputs list of commands available in cctrl
• Use help <command> for more detail on each command
cctrl
ls
• COORDINATOR[db3:AUTOMATIC:ONLINE]
• Identifies current Coordinator host and Current Cluster Mode
• ROUTERS:
• Lists all connectors associated with the installation, each connector shows status, and
created/active connection counts
• DATASOURCES:
• Lists all nodes that form the cluster
cctrl
Host, Role, Status
Last seqno
Extracted Latency from DB commit to THL
Last seqno
Applied Latency Applying to Target Database
cctrl
Status of manager process Role and status of replicator process
Status of MySQL DatabaseConnections through Connectors to DB
Role and status of replicator process. On a replica, shows primary the replica is connected to
cctrl
cluster validate
• Checks the validity of the cluster and ensures that all nodes are reachable
cctrl
cluster heartbeat
• Inserts an entry into the Primary ‘heartbeat’ table
• Good way to check that replication is flowing properly
• Check the progress= entries in the ls output
cctrl
Cluster Policy Modes
• AUTOMATIC
• Normal Operational state
• Ensures automatic failover
• Will attempt auto-recovery of components (MySQL server and Replicator)
• MAINTENANCE
• Prevents automatic operations mentioned above
• Should ONLY be used during Maintenance Windows
trepctl
• Used to control and manage the replicator Java process
• Most common uses are
• View replicator status
• Stop/Start replication
• Skip “safe” errors
• trepctl help to see all options
trepctl
• trepctl services
• Short list output of all services running on the host
• Shows basic information
• trepctl [-service SERVICENAME] status [-r N]
• Shows the full status of the replicator
• Specify –service if multiple services available
• Specify –r N to refresh every N seconds or until CTRL+C
• trepctl [-service SERVICENAME] status -name stages
• A more complete status view showing detailed output of each replicator stage
trepctl
• trepctl [-service SERVICENAME] qs [-r N]
• Shows a quick summary of the replicator progress
• Specify –service if multiple services available
• Specify –r N to refresh every N seconds or until CTRL+C
• trepctl [-service SERVICENAME] perf [-r N]
• Shows the status of each stage of the replication pipeline
• Output differs between Primary and Replicas
• Specify –service if there are multiple services available
• Specify –r N to refresh every N seconds or until CTRL+C
trepctl
• trepctl [-service SERVICENAME] reset {OPTIONS}
• Performs a FULL reset of the replicator
• VERY destructive if used incorrectly
• Resets SEQNO to 0
• trepctl [-service SERVICENAME] offline|online {OPTIONS}
• Bring a service online or offline
• Can be used with various options to control how/when
• Used with –skip-seqno to skip errors
trepctl status
appliedLastEventId : mysql-bin.000005:0000000051631947;-1
appliedLastSeqno : 166764
appliedLatency : 0.769
autoRecoveryEnabled : false
autoRecoveryTotal : 0
channels : 1
clusterName : alpha
currentEventId : mysql-bin.000005:0000000051631947
currentTimeMillis : 1578578135591
dataServerHost : trainingdb1
extensions :
host : trainingdb1
latestEpochNumber : 9
masterConnectUri : thl://localhost:/
masterListenUri : thl://trainingdb1:2112/
trepctl status
appliedLastEventId : mysql-bin.000005:0000000051631947;-1
appliedLastSeqno : 166764
appliedLatency : 0.769
autoRecoveryEnabled : false
autoRecoveryTotal : 0
channels : 1
clusterName : alpha
currentEventId : mysql-bin.000005:0000000051631947
currentTimeMillis : 1578578135591
dataServerHost : trainingdb1
extensions :
host : trainingdb1
latestEpochNumber : 9
masterConnectUri : thl://localhost:/
masterListenUri : thl:// trainingdb1 :2112/
On a Primary, the last ending
binary log position written to the
THL along with the Seqno for that
event, and the latency between
the database commit to the
binlog and the THL write
completion.
On a replica, displays the last
event written to the target
database with the corresponding
Seqno, and the latency between
the source database commit and
the completed apply of that
event to the target database.
trepctl status
appliedLastEventId : mysql-bin.000005:0000000051631947;-1
appliedLastSeqno : 166764
appliedLatency : 0.769
autoRecoveryEnabled : false
autoRecoveryTotal : 0
channels : 1
clusterName : alpha
currentEventId : mysql-bin.000005:0000000051631947
currentTimeMillis : 1578578135591
dataServerHost : trainingdb1
extensions :
host : trainingdb1
latestEpochNumber : 9
masterConnectUri : thl://localhost:/
masterListenUri : thl:// trainingdb1 :2112/
Auto-Recovery properties
trepctl status
appliedLastEventId : mysql-bin.000005:0000000051631947;-1
appliedLastSeqno : 166764
appliedLatency : 0.769
autoRecoveryEnabled : false
autoRecoveryTotal : 0
channels : 1
clusterName : alpha
currentEventId : mysql-bin.000005:0000000051631947
currentTimeMillis : 1578578135591
dataServerHost : trainingdb1
extensions :
host : trainingdb1
latestEpochNumber : 9
masterConnectUri : thl://localhost:/
masterListenUri : thl://trainingdb1:2112/
Current Binlog position of the
database (NONE on Replicas)
trepctl status
appliedLastEventId : mysql-bin.000005:0000000051631947;-1
appliedLastSeqno : 166764
appliedLatency : 0.769
autoRecoveryEnabled : false
autoRecoveryTotal : 0
channels : 1
clusterName : alpha
currentEventId : mysql-bin.000005:0000000051631947
currentTimeMillis : 1578578135591
dataServerHost : trainingdb1
extensions :
host : trainingdb1
latestEpochNumber : 9
masterConnectUri : thl://localhost:/
masterListenUri : thl://trainingdb1:2112/
masterConnectUri shows the
source THL server we are
connected to
masterListenUri shows the THL
server listener protocol, host and
port information for replicas to
connect with
trepctl status
maximumStoredSeqNo : 166764
minimumStoredSeqNo : 0
offlineRequests : NONE
pendingError : NONE
pendingErrorCode : NONE
pendingErrorEventId : NONE
pendingErrorSeqno : -1
pendingExceptionMessage: NONE
pipelineSource : /var/lib/mysql
relativeLatency : 580.591
resourceJdbcDriver : org.drizzle.jdbc.DrizzleDriver
resourceJdbcUrl : jdbc:mysql:thin://trainingdb1:13306/${DBNAME}. . .
resourcePrecedence : 99
resourceVendor : mysql
rmiPort : 10000
trepctl status
maximumStoredSeqNo : 166764
minimumStoredSeqNo : 0
offlineRequests : NONE
pendingError : NONE
pendingErrorCode : NONE
pendingErrorEventId : NONE
pendingErrorSeqno : -1
pendingExceptionMessage: NONE
pipelineSource : /var/lib/mysql
relativeLatency : 580.591
resourceJdbcDriver : org.drizzle.jdbc.DrizzleDriver
resourceJdbcUrl : jdbc:mysql:thin:// trainingdb1:13306 /${DBNAME}. . .
resourcePrecedence : 99
resourceVendor : mysql
rmiPort : 10000
When the Replicator goes into an
OFFLINE:ERROR state, these
fields will show all the associated
information. Always check the
trepsvc.log file for more
detail as needed.
trepctl status
maximumStoredSeqNo : 166764
minimumStoredSeqNo : 0
offlineRequests : NONE
pendingError : NONE
pendingErrorCode : NONE
pendingErrorEventId : NONE
pendingErrorSeqno : -1
pendingExceptionMessage: NONE
pipelineSource : /var/lib/mysql
relativeLatency : 580.591
resourceJdbcDriver : org.drizzle.jdbc.DrizzleDriver
resourceJdbcUrl : jdbc:mysql:thin://trainingdb1:13306/${DBNAME}. . .
resourcePrecedence : 99
resourceVendor : mysql
rmiPort : 10000
The current source of THL. Most cases
will match the masterConnectUri
unless using an MSAA topology. A
Primary will show the binary log
directory.
trepctl status
maximumStoredSeqNo : 166764
minimumStoredSeqNo : 0
offlineRequests : NONE
pendingError : NONE
pendingErrorCode : NONE
pendingErrorEventId : NONE
pendingErrorSeqno : -1
pendingExceptionMessage: NONE
pipelineSource : /var/lib/mysql
relativeLatency : 580.591
resourceJdbcDriver : org.drizzle.jdbc.DrizzleDriver
resourceJdbcUrl : jdbc:mysql:thin://trainingdb1:13306/${DBNAME}. . .
resourcePrecedence : 99
resourceVendor : mysql
rmiPort : 10000
Latency between NOW and the
timestamp of the last event in the
local THL.
trepctl status
role : master
seqnoType : java.lang.Long
serviceName : alpha
serviceType : local
simpleServiceName : alpha
siteName : default
sourceId : trainingdb1
state : ONLINE
timeInStateSeconds : 85641.738
timezone : GMT
transitioningTo :
uptimeSeconds : 85673.511
useSSLConnection : false
version : Tungsten Clustering 6.1.4 build 44
trepctl status
role : master
seqnoType : java.lang.Long
serviceName : training1
serviceType : local
simpleServiceName : training1
siteName : default
sourceId : trainingdb1
state : ONLINE
timeInStateSeconds : 85641.738
timezone : GMT
transitioningTo :
uptimeSeconds : 85673.511
useSSLConnection : false
version : Tungsten Clustering 6.1.4 build 44
Current role : master, slave or
relay
Current State, can be :
• ONLINE
• ONLINE:DEGRADED
• ONLINE:DEGRADED-BINLOG-FULLY-READ
• OFFLINE:NORMAL
• SUSPECT
• OFFLINE:ERROR
• GOING-ONLINE:SYNCHRONISING
• GOING-ONLINE:RESTORING
• GOING-ONLINE:PROVISIONING
Applied Latency vs Relative Latency
The appliedLatency is the latency between the commit
time of the source event and the time the last committed
transaction reached the end of the corresponding
pipeline within the replicator.
Within a primary, this indicates the latency between the
transaction commit time and when it was written to the
THL.
In a replica, it indicates the latency between the commit
time on the primary database and when the transaction
has been committed to the destination database.
Clocks must be synchronized across hosts for this
information to be accurate. The latency is measured in
seconds.
Increasing latency may indicate that the destination
database is unable to keep up with the transactions from
the primary. In replicators that are operating with parallel
apply, appliedLatency indicates the latency of the trailing
channel. Because the parallel apply mechanism does not
update all channels simultaneously, the figure shown may
trail significantly from the actual latency.
The relativeLatency is the latency between now and
timestamp of the last event written into the local THL.
This information gives an indication of how fresh the incoming
THL information is.
On a primary, it indicates whether the primary is keeping up
with transactions generated on the primary database.
On a replica, it indicates how up to date the THL read from the
extractor is.
A large value can either indicate that the database is not busy,
that a large transaction is currently being read from the source
database or from the primary replicator, or that the replicator
has stalled for some reason.
An increasing relativeLatency on the replica may indicate that
the replicator may have stalled and stopped applying changes
to the database.
thl
• Interface for viewing the contents of the THL
• thl help to view all command options
• thl info – Show a summary of the THL available on disk
• thl list will product a lot of output, always use with options to filter the result set
• -low|from SEQ – Start from supplied seqno
• -high|to SEQ – Stop at supplie seqno
• -first – Show first seqno available
• -first N – Show first N entries
• -last – Show last seqno available
• -last N – Show last N entries
• thl index – re-index THL – can help to speed up replicator restarts
• thl purge – Use with CARE since this command will REMOVE ALL THL on disk for that service
thl
SEQ# = 2 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:50:52.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000000939;12297
- SOURCEID = db1
- METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; 
- service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, 
unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, 
sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, 
ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, 
collation_connection = 33, collation_server = 8]
- SCHEMA = hr
- SQL(0) = CREATE TABLE regions
( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, region_name VARCHAR(25)
)
thl
SEQ# = 2 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:50:52.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000000939;12297
- SOURCEID = db1
- METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; 
- service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, 
unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, 
sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, 
ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, 
collation_connection = 33, collation_server = 8]
- SCHEMA = hr
- SQL(0) = CREATE TABLE regions
( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, region_name VARCHAR(25)
)
Global Sequence number for the event
thl
SEQ# = 2 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:50:52.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000000939;12297
- SOURCEID = db1
- METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; 
- service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, 
unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, 
sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, 
ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, 
collation_connection = 33, collation_server = 8]
- SCHEMA = hr
- SQL(0) = CREATE TABLE regions
( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, region_name VARCHAR(25)
)
Associated THL File on Disk
thl
SEQ# = 2 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:50:52.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000000939;12297
- SOURCEID = db1
- METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; 
- service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, 
unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, 
sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, 
ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, 
collation_connection = 33, collation_server = 8]
- SCHEMA = hr
- SQL(0) = CREATE TABLE regions
( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, region_name VARCHAR(25)
)
Commit time to Binary Logs
thl
SEQ# = 2 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:50:52.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000000939;12297
- SOURCEID = db1
- METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; 
- service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, 
unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, 
sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, 
ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, 
collation_connection = 33, collation_server = 8]
- SCHEMA = hr
- SQL(0) = CREATE TABLE regions
( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, region_name VARCHAR(25)
)
Associated Binary Log File and Position
thl
SEQ# = 2 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:50:52.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000000939;12297
- SOURCEID = db1
- METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; 
- service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, 
unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, 
sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, 
ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, 
collation_connection = 33, collation_server = 8]
- SCHEMA = hr
- SQL(0) = CREATE TABLE regions
( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, region_name VARCHAR(25)
)
Source of transaction (Should be a Primary!)
thl
SEQ# = 2 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:50:52.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000000939;12297
- SOURCEID = db1
- METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; 
- service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, 
unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, 
sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, 
ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, 
collation_connection = 33, collation_server = 8]
- SCHEMA = hr
- SQL(0) = CREATE TABLE regions
( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, region_name VARCHAR(25)
)
Metadata
thl
SEQ# = 2 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:50:52.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000000939;12297
- SOURCEID = db1
- METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; 
- service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, 
unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, 
sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, 
ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, 
collation_connection = 33, collation_server = 8]
- SCHEMA = hr
- SQL(0) = CREATE TABLE regions
( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, region_name VARCHAR(25)
)
The database schema that the
following SQL is being applied to
thl
SEQ# = 2 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:50:52.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000000939;12297
- SOURCEID = db1
- METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; 
- service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, 
unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, 
sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, 
ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, 
collation_connection = 33, collation_server = 8]
- SCHEMA = hr
- SQL(0) = CREATE TABLE regions
( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, region_name VARCHAR(25)
)
DDL Statement
thl
SEQ# = 5 / FRAG# = 0 (last frag)
- FILE = thl.data.0000000001
- TIME = 2020-01-08 13:51:38.0
- EPOCH# = 0
- EVENTID = mysql-bin.000005:0000000000001746;-1
- SOURCEID = db1
- METADATA = [mysql_server_id=101;dbms_type=mysql;tz_aware=true;service=training1;shard=hr]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [foreign_key_checks = 1, unique_checks = 1, time_zone = '+00:00', ##charset = UTF-8]
- SQL(0) =
- ACTION = INSERT
- SCHEMA = hr
- TABLE = regions
- ROW# = 0
- COL(1: ) = 1
- COL(2: ) = europe
Row Change Data
When the PrimaryKey
(pkey) filter is enabled,
the key information is
optimized to only
contain the actual
primary keys for the
row-based THL record.
- SQL(0) =
- ACTION = UPDATE
- SCHEMA = hr
- TABLE = regions
- ROW# = 0
- COL(1: ) = 1
- COL(2: ) = Europe
- KEY(1: ) = 1
- KEY(2: ) = europe
- SQL(0) =
- ACTION = UPDATE
- SCHEMA = hr
- TABLE = regions
- ROW# = 0
- COL(1: ) = 1
- COL(2: ) = Europe
- KEY(1: ) = 1
- SQL(0) =
- ACTION = DELETE
- SCHEMA = hr
- TABLE = regions
- ROW# = 0
- KEY(1: ) = 1
- KEY(2: ) = Europe
- SQL(0) =
- ACTION = DELETE
- SCHEMA = hr
- TABLE = regions
- ROW# = 0
- KEY(1: ) = 1
UPDATE DELETE
Without
pkey filter
With
pkey filter
Other useful tools
• dsctl
• Advanced method to reset replicator position
• tungsten_find_position
• Can be used to interrogate THL for a specific binary log position and return a dsctl command
to reposition a replicator
• tungsten_find_seqno
• Works in the same way as tungsten_find_position but searches based on a sequence
number
• multi_trepctl
• Useful for Multi-Site/Active-Active deployments
Summary
What we have learnt today
• How to use the command line tools
• tpm
• cctrl
• trepctl
• thl
• How to interpret status output
Next Steps
In the next session we will
• Discuss Maintenance Operations
• Isolating Cluster Nodes
• Updating paramaters
• Failover/Switches
• Rolling Maintenance
• Upgrades
THANK YOU FOR LISTENING
continuent.com
The MySQL Availability Company
Chris Parker, Customer Success Director, EMEA & APAC

More Related Content

What's hot

Anatomy of neutron from the eagle eyes of troubelshoorters
Anatomy of neutron from the eagle eyes of troubelshoortersAnatomy of neutron from the eagle eyes of troubelshoorters
Anatomy of neutron from the eagle eyes of troubelshoortersSadique Puthen
 
Troubleshooting containerized triple o deployment
Troubleshooting containerized triple o deploymentTroubleshooting containerized triple o deployment
Troubleshooting containerized triple o deploymentSadique Puthen
 
How to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing SleepHow to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing SleepSadique Puthen
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Diverajdeep
 
High available energy management system
High available energy management systemHigh available energy management system
High available energy management systemJo Ee Liew
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machineAlexei Starovoitov
 
Managing Open vSwitch Across a Large Heterogenous Fleet
Managing Open vSwitch Across a Large Heterogenous FleetManaging Open vSwitch Across a Large Heterogenous Fleet
Managing Open vSwitch Across a Large Heterogenous Fleetandyhky
 
2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful ServicesThomas Graf
 
Open VSwitch .. Use it for your day to day needs
Open VSwitch .. Use it for your day to day needsOpen VSwitch .. Use it for your day to day needs
Open VSwitch .. Use it for your day to day needsrranjithrajaram
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet CountAmazon Web Services
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic ControlSUSE Labs Taipei
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking ExplainedThomas Graf
 
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATOpen vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATThomas Graf
 
Open vswitch datapath implementation
Open vswitch datapath implementationOpen vswitch datapath implementation
Open vswitch datapath implementationVishal Kapoor
 
Network emulator
Network emulatorNetwork emulator
Network emulatorjeromy fu
 
New Ways to Find Latency in Linux Using Tracing
New Ways to Find Latency in Linux Using TracingNew Ways to Find Latency in Linux Using Tracing
New Ways to Find Latency in Linux Using TracingScyllaDB
 
Geographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deploymentGeographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deploymentMarco Tusa
 

What's hot (20)

Anatomy of neutron from the eagle eyes of troubelshoorters
Anatomy of neutron from the eagle eyes of troubelshoortersAnatomy of neutron from the eagle eyes of troubelshoorters
Anatomy of neutron from the eagle eyes of troubelshoorters
 
Troubleshooting containerized triple o deployment
Troubleshooting containerized triple o deploymentTroubleshooting containerized triple o deployment
Troubleshooting containerized triple o deployment
 
How to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing SleepHow to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing Sleep
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Dive
 
Seminar
SeminarSeminar
Seminar
 
High available energy management system
High available energy management systemHigh available energy management system
High available energy management system
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machine
 
Managing Open vSwitch Across a Large Heterogenous Fleet
Managing Open vSwitch Across a Large Heterogenous FleetManaging Open vSwitch Across a Large Heterogenous Fleet
Managing Open vSwitch Across a Large Heterogenous Fleet
 
Lect9
Lect9Lect9
Lect9
 
2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services
 
Open VSwitch .. Use it for your day to day needs
Open VSwitch .. Use it for your day to day needsOpen VSwitch .. Use it for your day to day needs
Open VSwitch .. Use it for your day to day needs
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet Count
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATOpen vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NAT
 
Open vswitch datapath implementation
Open vswitch datapath implementationOpen vswitch datapath implementation
Open vswitch datapath implementation
 
Network emulator
Network emulatorNetwork emulator
Network emulator
 
New Ways to Find Latency in Linux Using Tracing
New Ways to Find Latency in Linux Using TracingNew Ways to Find Latency in Linux Using Tracing
New Ways to Find Latency in Linux Using Tracing
 
The value of reactive
The value of reactiveThe value of reactive
The value of reactive
 
Geographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deploymentGeographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deployment
 

Similar to Training Slides: 104 - Basics - Working With Command Line Tools

Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...Continuent
 
Training Slides: Basics 104: Simple Tungsten Clustering Deployments
Training Slides: Basics 104: Simple Tungsten Clustering DeploymentsTraining Slides: Basics 104: Simple Tungsten Clustering Deployments
Training Slides: Basics 104: Simple Tungsten Clustering DeploymentsContinuent
 
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Continuent
 
Training Slides: Basics 102: Introduction to Tungsten Clustering
Training Slides: Basics 102: Introduction to Tungsten ClusteringTraining Slides: Basics 102: Introduction to Tungsten Clustering
Training Slides: Basics 102: Introduction to Tungsten ClusteringContinuent
 
Training Slides: 202 - Monitoring & Troubleshooting
Training Slides: 202 - Monitoring & TroubleshootingTraining Slides: 202 - Monitoring & Troubleshooting
Training Slides: 202 - Monitoring & TroubleshootingContinuent
 
Training Slides: Advanced 302: Performing Schema Changes in a Multi-Site/Mult...
Training Slides: Advanced 302: Performing Schema Changes in a Multi-Site/Mult...Training Slides: Advanced 302: Performing Schema Changes in a Multi-Site/Mult...
Training Slides: Advanced 302: Performing Schema Changes in a Multi-Site/Mult...Continuent
 
VMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep DiveVMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep DiveVMworld
 
[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)altistory
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
 
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTroubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTanel Poder
 
CPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCoburn Watson
 
Troubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issuesTroubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issuesMichael Klishin
 
Migrating To PostgreSQL
Migrating To PostgreSQLMigrating To PostgreSQL
Migrating To PostgreSQLGrant Fritchey
 
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.The Linux Foundation
 
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSPDiscretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSPTathagata Das
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaaCuneyt Goksu
 
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...Continuent
 

Similar to Training Slides: 104 - Basics - Working With Command Line Tools (20)

Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
 
Training Slides: Basics 104: Simple Tungsten Clustering Deployments
Training Slides: Basics 104: Simple Tungsten Clustering DeploymentsTraining Slides: Basics 104: Simple Tungsten Clustering Deployments
Training Slides: Basics 104: Simple Tungsten Clustering Deployments
 
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
 
Training Slides: Basics 102: Introduction to Tungsten Clustering
Training Slides: Basics 102: Introduction to Tungsten ClusteringTraining Slides: Basics 102: Introduction to Tungsten Clustering
Training Slides: Basics 102: Introduction to Tungsten Clustering
 
Training Slides: 202 - Monitoring & Troubleshooting
Training Slides: 202 - Monitoring & TroubleshootingTraining Slides: 202 - Monitoring & Troubleshooting
Training Slides: 202 - Monitoring & Troubleshooting
 
Training Slides: Advanced 302: Performing Schema Changes in a Multi-Site/Mult...
Training Slides: Advanced 302: Performing Schema Changes in a Multi-Site/Mult...Training Slides: Advanced 302: Performing Schema Changes in a Multi-Site/Mult...
Training Slides: Advanced 302: Performing Schema Changes in a Multi-Site/Mult...
 
VMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep DiveVMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep Dive
 
[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contention
 
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTroubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
 
CPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performance
 
Perf Tuning Short
Perf Tuning ShortPerf Tuning Short
Perf Tuning Short
 
Concurrency
ConcurrencyConcurrency
Concurrency
 
Troubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issuesTroubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issues
 
Migrating To PostgreSQL
Migrating To PostgreSQLMigrating To PostgreSQL
Migrating To PostgreSQL
 
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
 
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSPDiscretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
Discretized Stream - Fault-Tolerant Streaming Computation at Scale - SOSP
 
nested-kvm
nested-kvmnested-kvm
nested-kvm
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
 
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
 

More from Continuent

Tungsten Webinar: v6 & v7 Release Recap, and Beyond
Tungsten Webinar: v6 & v7 Release Recap, and BeyondTungsten Webinar: v6 & v7 Release Recap, and Beyond
Tungsten Webinar: v6 & v7 Release Recap, and BeyondContinuent
 
Continuent Tungsten Value Proposition Webinar
Continuent Tungsten Value Proposition WebinarContinuent Tungsten Value Proposition Webinar
Continuent Tungsten Value Proposition WebinarContinuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControlWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControlContinuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterContinuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQLWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQLContinuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterContinuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS Aurora
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS AuroraWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS Aurora
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS AuroraContinuent
 
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...Continuent
 
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...Continuent
 
Webinar Slides: Intelligent Database Proxies: Routing & Transparent Failover
Webinar Slides: Intelligent Database Proxies: Routing & Transparent FailoverWebinar Slides: Intelligent Database Proxies: Routing & Transparent Failover
Webinar Slides: Intelligent Database Proxies: Routing & Transparent FailoverContinuent
 
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...Continuent
 
Training Slides: 205 - Installing and Configuring Tungsten Dashboard
Training Slides: 205 - Installing and Configuring Tungsten DashboardTraining Slides: 205 - Installing and Configuring Tungsten Dashboard
Training Slides: 205 - Installing and Configuring Tungsten DashboardContinuent
 
Training Slides: 352 - Tungsten Replicator for MongoDB & Kafka
Training Slides: 352 - Tungsten Replicator for MongoDB & KafkaTraining Slides: 352 - Tungsten Replicator for MongoDB & Kafka
Training Slides: 352 - Tungsten Replicator for MongoDB & KafkaContinuent
 
Training Slides: 351 - Tungsten Replicator for Data Warehouses
Training Slides: 351 - Tungsten Replicator for Data WarehousesTraining Slides: 351 - Tungsten Replicator for Data Warehouses
Training Slides: 351 - Tungsten Replicator for Data WarehousesContinuent
 
Training Slides: 303 - Replicating out of a Cluster
Training Slides: 303 - Replicating out of a ClusterTraining Slides: 303 - Replicating out of a Cluster
Training Slides: 303 - Replicating out of a ClusterContinuent
 
Training Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMITraining Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMIContinuent
 
Training Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMITraining Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMIContinuent
 
Training Slides: 253 - Filter like a Pro
Training Slides: 253 - Filter like a ProTraining Slides: 253 - Filter like a Pro
Training Slides: 253 - Filter like a ProContinuent
 
Training Slides: 252 - Monitoring & Troubleshooting
Training Slides: 252 - Monitoring & TroubleshootingTraining Slides: 252 - Monitoring & Troubleshooting
Training Slides: 252 - Monitoring & TroubleshootingContinuent
 
Training Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSLTraining Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSLContinuent
 

More from Continuent (20)

Tungsten Webinar: v6 & v7 Release Recap, and Beyond
Tungsten Webinar: v6 & v7 Release Recap, and BeyondTungsten Webinar: v6 & v7 Release Recap, and Beyond
Tungsten Webinar: v6 & v7 Release Recap, and Beyond
 
Continuent Tungsten Value Proposition Webinar
Continuent Tungsten Value Proposition WebinarContinuent Tungsten Value Proposition Webinar
Continuent Tungsten Value Proposition Webinar
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControlWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQLWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #2: Galera Cluster
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS Aurora
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS AuroraWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS Aurora
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #1: AWS Aurora
 
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
 
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
Webinar Slides: No Data Loss MySQL: Guaranteed Credit Card Transaction Availa...
 
Webinar Slides: Intelligent Database Proxies: Routing & Transparent Failover
Webinar Slides: Intelligent Database Proxies: Routing & Transparent FailoverWebinar Slides: Intelligent Database Proxies: Routing & Transparent Failover
Webinar Slides: Intelligent Database Proxies: Routing & Transparent Failover
 
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
Webinar Slides: High Volume MySQL HA: SaaS Continuous Operations with Terabyt...
 
Training Slides: 205 - Installing and Configuring Tungsten Dashboard
Training Slides: 205 - Installing and Configuring Tungsten DashboardTraining Slides: 205 - Installing and Configuring Tungsten Dashboard
Training Slides: 205 - Installing and Configuring Tungsten Dashboard
 
Training Slides: 352 - Tungsten Replicator for MongoDB & Kafka
Training Slides: 352 - Tungsten Replicator for MongoDB & KafkaTraining Slides: 352 - Tungsten Replicator for MongoDB & Kafka
Training Slides: 352 - Tungsten Replicator for MongoDB & Kafka
 
Training Slides: 351 - Tungsten Replicator for Data Warehouses
Training Slides: 351 - Tungsten Replicator for Data WarehousesTraining Slides: 351 - Tungsten Replicator for Data Warehouses
Training Slides: 351 - Tungsten Replicator for Data Warehouses
 
Training Slides: 303 - Replicating out of a Cluster
Training Slides: 303 - Replicating out of a ClusterTraining Slides: 303 - Replicating out of a Cluster
Training Slides: 303 - Replicating out of a Cluster
 
Training Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMITraining Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMI
 
Training Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMITraining Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMI
 
Training Slides: 253 - Filter like a Pro
Training Slides: 253 - Filter like a ProTraining Slides: 253 - Filter like a Pro
Training Slides: 253 - Filter like a Pro
 
Training Slides: 252 - Monitoring & Troubleshooting
Training Slides: 252 - Monitoring & TroubleshootingTraining Slides: 252 - Monitoring & Troubleshooting
Training Slides: 252 - Monitoring & Troubleshooting
 
Training Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSLTraining Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSL
 

Recently uploaded

Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.krishnachandrapal52
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理F
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiMonica Sydney
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Balliameghakumariji156
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理F
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样ayvbos
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdfMatthew Sinclair
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 

Recently uploaded (20)

Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 

Training Slides: 104 - Basics - Working With Command Line Tools

  • 1. The MySQL Availability Company Tungsten Cluster Master Class Basics: Working with Command Line Tools Chris Parker, Customer Success Director, EMEA & APAC
  • 2. Topics In this short course, we will • Re-cap the previous Installation • Explore the main Command Line Tools • tpm • cctrl • trepctl • thl
  • 4. Tungsten Cluster Standalone Cluster • Minimum 3 nodes • 1 Primary • 2 Replicas • Odd number of nodes • Single datacenter/region
  • 6. tpm • Tungsten Package Manager • As well as using tpm for installs and updates, it can also be used for a number of other actions. You can issue tpm help for a list of possible options. • Most common options: • tools/tpm validate[-update] • [tools/]tpm update [--replace-release] [--no-connectors] • tools/tpm install • tpm diag – Gathers package of stats for support! • tpm connector – Launches the MySQL command-line client and connects to the current Primary node via locally-running Connector process • tpm mysql – Launches the MySQL command-line client and connects to the MySQL server process running on the local host
  • 7. tpm connector • Simple and quick way to connect to the current MySQL Primary node via the command line • Only works on hosts where the Connector is running • Will authenticate using credential supplied via application-user and application-password properties • Provides additional commands to query database and cluster stats: • Connector-based Tungsten commands are NOT available in Bridge Mode • This is a good way to tell if you are in Bridge mode – if no commands are available, then you are in Bridge mode • `tungsten help` will show all commands available mysql> tungsten help; +---------------------------------------------------------------------------------------------------------------------------------+ | Message | +---------------------------------------------------------------------------------------------------------------------------------+ | tungsten connection status: display information about the connection used for the last request ran | | tungsten connection count: gives the count of current connections to each one of the cluster datasources | | tungsten cluster status: prints detailed information about the cluster view this connector has | | tungsten show [full] processlist: list all running queries handled by this connector instance | | tungsten show variables [like '<string>']: list connector configuration options in use. The <string> may contain '%' wildcards | | tungsten flush privileges: reload user.map and refresh user credentials | | tungsten mem info: display memory information about current JVM | | tungsten gc: calls garbage collector | | tungsten help: display this help message | +---------------------------------------------------------------------------------------------------------------------------------+ 9 rows in set (0.00 sec)
  • 8. cctrl • cctrl stands for Cluster Control • Can be executed from any node running the manager in the cluster. For example, running cctrl on a Connector-only host will fail. • Allows control of all nodes in the cluster • Main uses are • Check cluster state • Isolate nodes for maintenance • Switch Primary nodes • Recover nodes following failure/recovery • Perform backup/recovery operations • Requires the Manager to be running
  • 9. cctrl help • Outputs list of commands available in cctrl • Use help <command> for more detail on each command
  • 10. cctrl ls • COORDINATOR[db3:AUTOMATIC:ONLINE] • Identifies current Coordinator host and Current Cluster Mode • ROUTERS: • Lists all connectors associated with the installation, each connector shows status, and created/active connection counts • DATASOURCES: • Lists all nodes that form the cluster
  • 11. cctrl Host, Role, Status Last seqno Extracted Latency from DB commit to THL Last seqno Applied Latency Applying to Target Database
  • 12. cctrl Status of manager process Role and status of replicator process Status of MySQL DatabaseConnections through Connectors to DB Role and status of replicator process. On a replica, shows primary the replica is connected to
  • 13. cctrl cluster validate • Checks the validity of the cluster and ensures that all nodes are reachable
  • 14. cctrl cluster heartbeat • Inserts an entry into the Primary ‘heartbeat’ table • Good way to check that replication is flowing properly • Check the progress= entries in the ls output
  • 15. cctrl Cluster Policy Modes • AUTOMATIC • Normal Operational state • Ensures automatic failover • Will attempt auto-recovery of components (MySQL server and Replicator) • MAINTENANCE • Prevents automatic operations mentioned above • Should ONLY be used during Maintenance Windows
  • 16. trepctl • Used to control and manage the replicator Java process • Most common uses are • View replicator status • Stop/Start replication • Skip “safe” errors • trepctl help to see all options
  • 17. trepctl • trepctl services • Short list output of all services running on the host • Shows basic information • trepctl [-service SERVICENAME] status [-r N] • Shows the full status of the replicator • Specify –service if multiple services available • Specify –r N to refresh every N seconds or until CTRL+C • trepctl [-service SERVICENAME] status -name stages • A more complete status view showing detailed output of each replicator stage
  • 18. trepctl • trepctl [-service SERVICENAME] qs [-r N] • Shows a quick summary of the replicator progress • Specify –service if multiple services available • Specify –r N to refresh every N seconds or until CTRL+C • trepctl [-service SERVICENAME] perf [-r N] • Shows the status of each stage of the replication pipeline • Output differs between Primary and Replicas • Specify –service if there are multiple services available • Specify –r N to refresh every N seconds or until CTRL+C
  • 19. trepctl • trepctl [-service SERVICENAME] reset {OPTIONS} • Performs a FULL reset of the replicator • VERY destructive if used incorrectly • Resets SEQNO to 0 • trepctl [-service SERVICENAME] offline|online {OPTIONS} • Bring a service online or offline • Can be used with various options to control how/when • Used with –skip-seqno to skip errors
  • 20. trepctl status appliedLastEventId : mysql-bin.000005:0000000051631947;-1 appliedLastSeqno : 166764 appliedLatency : 0.769 autoRecoveryEnabled : false autoRecoveryTotal : 0 channels : 1 clusterName : alpha currentEventId : mysql-bin.000005:0000000051631947 currentTimeMillis : 1578578135591 dataServerHost : trainingdb1 extensions : host : trainingdb1 latestEpochNumber : 9 masterConnectUri : thl://localhost:/ masterListenUri : thl://trainingdb1:2112/
  • 21. trepctl status appliedLastEventId : mysql-bin.000005:0000000051631947;-1 appliedLastSeqno : 166764 appliedLatency : 0.769 autoRecoveryEnabled : false autoRecoveryTotal : 0 channels : 1 clusterName : alpha currentEventId : mysql-bin.000005:0000000051631947 currentTimeMillis : 1578578135591 dataServerHost : trainingdb1 extensions : host : trainingdb1 latestEpochNumber : 9 masterConnectUri : thl://localhost:/ masterListenUri : thl:// trainingdb1 :2112/ On a Primary, the last ending binary log position written to the THL along with the Seqno for that event, and the latency between the database commit to the binlog and the THL write completion. On a replica, displays the last event written to the target database with the corresponding Seqno, and the latency between the source database commit and the completed apply of that event to the target database.
  • 22. trepctl status appliedLastEventId : mysql-bin.000005:0000000051631947;-1 appliedLastSeqno : 166764 appliedLatency : 0.769 autoRecoveryEnabled : false autoRecoveryTotal : 0 channels : 1 clusterName : alpha currentEventId : mysql-bin.000005:0000000051631947 currentTimeMillis : 1578578135591 dataServerHost : trainingdb1 extensions : host : trainingdb1 latestEpochNumber : 9 masterConnectUri : thl://localhost:/ masterListenUri : thl:// trainingdb1 :2112/ Auto-Recovery properties
  • 23. trepctl status appliedLastEventId : mysql-bin.000005:0000000051631947;-1 appliedLastSeqno : 166764 appliedLatency : 0.769 autoRecoveryEnabled : false autoRecoveryTotal : 0 channels : 1 clusterName : alpha currentEventId : mysql-bin.000005:0000000051631947 currentTimeMillis : 1578578135591 dataServerHost : trainingdb1 extensions : host : trainingdb1 latestEpochNumber : 9 masterConnectUri : thl://localhost:/ masterListenUri : thl://trainingdb1:2112/ Current Binlog position of the database (NONE on Replicas)
  • 24. trepctl status appliedLastEventId : mysql-bin.000005:0000000051631947;-1 appliedLastSeqno : 166764 appliedLatency : 0.769 autoRecoveryEnabled : false autoRecoveryTotal : 0 channels : 1 clusterName : alpha currentEventId : mysql-bin.000005:0000000051631947 currentTimeMillis : 1578578135591 dataServerHost : trainingdb1 extensions : host : trainingdb1 latestEpochNumber : 9 masterConnectUri : thl://localhost:/ masterListenUri : thl://trainingdb1:2112/ masterConnectUri shows the source THL server we are connected to masterListenUri shows the THL server listener protocol, host and port information for replicas to connect with
  • 25. trepctl status maximumStoredSeqNo : 166764 minimumStoredSeqNo : 0 offlineRequests : NONE pendingError : NONE pendingErrorCode : NONE pendingErrorEventId : NONE pendingErrorSeqno : -1 pendingExceptionMessage: NONE pipelineSource : /var/lib/mysql relativeLatency : 580.591 resourceJdbcDriver : org.drizzle.jdbc.DrizzleDriver resourceJdbcUrl : jdbc:mysql:thin://trainingdb1:13306/${DBNAME}. . . resourcePrecedence : 99 resourceVendor : mysql rmiPort : 10000
  • 26. trepctl status maximumStoredSeqNo : 166764 minimumStoredSeqNo : 0 offlineRequests : NONE pendingError : NONE pendingErrorCode : NONE pendingErrorEventId : NONE pendingErrorSeqno : -1 pendingExceptionMessage: NONE pipelineSource : /var/lib/mysql relativeLatency : 580.591 resourceJdbcDriver : org.drizzle.jdbc.DrizzleDriver resourceJdbcUrl : jdbc:mysql:thin:// trainingdb1:13306 /${DBNAME}. . . resourcePrecedence : 99 resourceVendor : mysql rmiPort : 10000 When the Replicator goes into an OFFLINE:ERROR state, these fields will show all the associated information. Always check the trepsvc.log file for more detail as needed.
  • 27. trepctl status maximumStoredSeqNo : 166764 minimumStoredSeqNo : 0 offlineRequests : NONE pendingError : NONE pendingErrorCode : NONE pendingErrorEventId : NONE pendingErrorSeqno : -1 pendingExceptionMessage: NONE pipelineSource : /var/lib/mysql relativeLatency : 580.591 resourceJdbcDriver : org.drizzle.jdbc.DrizzleDriver resourceJdbcUrl : jdbc:mysql:thin://trainingdb1:13306/${DBNAME}. . . resourcePrecedence : 99 resourceVendor : mysql rmiPort : 10000 The current source of THL. Most cases will match the masterConnectUri unless using an MSAA topology. A Primary will show the binary log directory.
  • 28. trepctl status maximumStoredSeqNo : 166764 minimumStoredSeqNo : 0 offlineRequests : NONE pendingError : NONE pendingErrorCode : NONE pendingErrorEventId : NONE pendingErrorSeqno : -1 pendingExceptionMessage: NONE pipelineSource : /var/lib/mysql relativeLatency : 580.591 resourceJdbcDriver : org.drizzle.jdbc.DrizzleDriver resourceJdbcUrl : jdbc:mysql:thin://trainingdb1:13306/${DBNAME}. . . resourcePrecedence : 99 resourceVendor : mysql rmiPort : 10000 Latency between NOW and the timestamp of the last event in the local THL.
  • 29. trepctl status role : master seqnoType : java.lang.Long serviceName : alpha serviceType : local simpleServiceName : alpha siteName : default sourceId : trainingdb1 state : ONLINE timeInStateSeconds : 85641.738 timezone : GMT transitioningTo : uptimeSeconds : 85673.511 useSSLConnection : false version : Tungsten Clustering 6.1.4 build 44
  • 30. trepctl status role : master seqnoType : java.lang.Long serviceName : training1 serviceType : local simpleServiceName : training1 siteName : default sourceId : trainingdb1 state : ONLINE timeInStateSeconds : 85641.738 timezone : GMT transitioningTo : uptimeSeconds : 85673.511 useSSLConnection : false version : Tungsten Clustering 6.1.4 build 44 Current role : master, slave or relay Current State, can be : • ONLINE • ONLINE:DEGRADED • ONLINE:DEGRADED-BINLOG-FULLY-READ • OFFLINE:NORMAL • SUSPECT • OFFLINE:ERROR • GOING-ONLINE:SYNCHRONISING • GOING-ONLINE:RESTORING • GOING-ONLINE:PROVISIONING
  • 31. Applied Latency vs Relative Latency The appliedLatency is the latency between the commit time of the source event and the time the last committed transaction reached the end of the corresponding pipeline within the replicator. Within a primary, this indicates the latency between the transaction commit time and when it was written to the THL. In a replica, it indicates the latency between the commit time on the primary database and when the transaction has been committed to the destination database. Clocks must be synchronized across hosts for this information to be accurate. The latency is measured in seconds. Increasing latency may indicate that the destination database is unable to keep up with the transactions from the primary. In replicators that are operating with parallel apply, appliedLatency indicates the latency of the trailing channel. Because the parallel apply mechanism does not update all channels simultaneously, the figure shown may trail significantly from the actual latency. The relativeLatency is the latency between now and timestamp of the last event written into the local THL. This information gives an indication of how fresh the incoming THL information is. On a primary, it indicates whether the primary is keeping up with transactions generated on the primary database. On a replica, it indicates how up to date the THL read from the extractor is. A large value can either indicate that the database is not busy, that a large transaction is currently being read from the source database or from the primary replicator, or that the replicator has stalled for some reason. An increasing relativeLatency on the replica may indicate that the replicator may have stalled and stopped applying changes to the database.
  • 32. thl • Interface for viewing the contents of the THL • thl help to view all command options • thl info – Show a summary of the THL available on disk • thl list will product a lot of output, always use with options to filter the result set • -low|from SEQ – Start from supplied seqno • -high|to SEQ – Stop at supplie seqno • -first – Show first seqno available • -first N – Show first N entries • -last – Show last seqno available • -last N – Show last N entries • thl index – re-index THL – can help to speed up replicator restarts • thl purge – Use with CARE since this command will REMOVE ALL THL on disk for that service
  • 33. thl SEQ# = 2 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:50:52.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000000939;12297 - SOURCEID = db1 - METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; - service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, collation_connection = 33, collation_server = 8] - SCHEMA = hr - SQL(0) = CREATE TABLE regions ( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , region_name VARCHAR(25) )
  • 34. thl SEQ# = 2 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:50:52.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000000939;12297 - SOURCEID = db1 - METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; - service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, collation_connection = 33, collation_server = 8] - SCHEMA = hr - SQL(0) = CREATE TABLE regions ( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , region_name VARCHAR(25) ) Global Sequence number for the event
  • 35. thl SEQ# = 2 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:50:52.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000000939;12297 - SOURCEID = db1 - METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; - service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, collation_connection = 33, collation_server = 8] - SCHEMA = hr - SQL(0) = CREATE TABLE regions ( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , region_name VARCHAR(25) ) Associated THL File on Disk
  • 36. thl SEQ# = 2 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:50:52.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000000939;12297 - SOURCEID = db1 - METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; - service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, collation_connection = 33, collation_server = 8] - SCHEMA = hr - SQL(0) = CREATE TABLE regions ( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , region_name VARCHAR(25) ) Commit time to Binary Logs
  • 37. thl SEQ# = 2 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:50:52.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000000939;12297 - SOURCEID = db1 - METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; - service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, collation_connection = 33, collation_server = 8] - SCHEMA = hr - SQL(0) = CREATE TABLE regions ( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , region_name VARCHAR(25) ) Associated Binary Log File and Position
  • 38. thl SEQ# = 2 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:50:52.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000000939;12297 - SOURCEID = db1 - METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; - service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, collation_connection = 33, collation_server = 8] - SCHEMA = hr - SQL(0) = CREATE TABLE regions ( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , region_name VARCHAR(25) ) Source of transaction (Should be a Primary!)
  • 39. thl SEQ# = 2 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:50:52.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000000939;12297 - SOURCEID = db1 - METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; - service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, collation_connection = 33, collation_server = 8] - SCHEMA = hr - SQL(0) = CREATE TABLE regions ( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , region_name VARCHAR(25) ) Metadata
  • 40. thl SEQ# = 2 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:50:52.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000000939;12297 - SOURCEID = db1 - METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; - service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, collation_connection = 33, collation_server = 8] - SCHEMA = hr - SQL(0) = CREATE TABLE regions ( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , region_name VARCHAR(25) ) The database schema that the following SQL is being applied to
  • 41. thl SEQ# = 2 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:50:52.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000000939;12297 - SOURCEID = db1 - METADATA = [mysql_server_id=101;unsafe_for_block_commit;dbms_type=mysql;tz_aware=true; - service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [##charset = UTF-8, autocommit = 1, sql_auto_is_null = 0, foreign_key_checks = 1, unique_checks = 1, auto_increment_increment = 2, auto_increment_offset = 1, sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE', character_set_client = 33, collation_connection = 33, collation_server = 8] - SCHEMA = hr - SQL(0) = CREATE TABLE regions ( region_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , region_name VARCHAR(25) ) DDL Statement
  • 42. thl SEQ# = 5 / FRAG# = 0 (last frag) - FILE = thl.data.0000000001 - TIME = 2020-01-08 13:51:38.0 - EPOCH# = 0 - EVENTID = mysql-bin.000005:0000000000001746;-1 - SOURCEID = db1 - METADATA = [mysql_server_id=101;dbms_type=mysql;tz_aware=true;service=training1;shard=hr] - TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent - OPTIONS = [foreign_key_checks = 1, unique_checks = 1, time_zone = '+00:00', ##charset = UTF-8] - SQL(0) = - ACTION = INSERT - SCHEMA = hr - TABLE = regions - ROW# = 0 - COL(1: ) = 1 - COL(2: ) = europe Row Change Data
  • 43. When the PrimaryKey (pkey) filter is enabled, the key information is optimized to only contain the actual primary keys for the row-based THL record. - SQL(0) = - ACTION = UPDATE - SCHEMA = hr - TABLE = regions - ROW# = 0 - COL(1: ) = 1 - COL(2: ) = Europe - KEY(1: ) = 1 - KEY(2: ) = europe - SQL(0) = - ACTION = UPDATE - SCHEMA = hr - TABLE = regions - ROW# = 0 - COL(1: ) = 1 - COL(2: ) = Europe - KEY(1: ) = 1 - SQL(0) = - ACTION = DELETE - SCHEMA = hr - TABLE = regions - ROW# = 0 - KEY(1: ) = 1 - KEY(2: ) = Europe - SQL(0) = - ACTION = DELETE - SCHEMA = hr - TABLE = regions - ROW# = 0 - KEY(1: ) = 1 UPDATE DELETE Without pkey filter With pkey filter
  • 44. Other useful tools • dsctl • Advanced method to reset replicator position • tungsten_find_position • Can be used to interrogate THL for a specific binary log position and return a dsctl command to reposition a replicator • tungsten_find_seqno • Works in the same way as tungsten_find_position but searches based on a sequence number • multi_trepctl • Useful for Multi-Site/Active-Active deployments
  • 45. Summary What we have learnt today • How to use the command line tools • tpm • cctrl • trepctl • thl • How to interpret status output
  • 46. Next Steps In the next session we will • Discuss Maintenance Operations • Isolating Cluster Nodes • Updating paramaters • Failover/Switches • Rolling Maintenance • Upgrades
  • 47. THANK YOU FOR LISTENING continuent.com The MySQL Availability Company Chris Parker, Customer Success Director, EMEA & APAC