charles-001 / dolphie

Your single pane of glass for real-time analytics into MySQL/MariaDB & ProxySQL
https://pypi.org/project/dolphie/
GNU General Public License v3.0
589 stars 36 forks source link

Improve replication dashboard #18

Closed lefred closed 1 year ago

lefred commented 1 year ago

Hello, For replication, I this this information could be valuable to have:

select * from performance_schema.global_variables where variable_name in ('binlog_transaction_dependency_tracking','replica_preserve_commit_order', 'replica_parallel_type','transaction_write_set_extraction', 'replica_parallel_workers');
+----------------------------------------+----------------+
| VARIABLE_NAME                          | VARIABLE_VALUE |
+----------------------------------------+----------------+
| binlog_transaction_dependency_tracking | WRITESET       |
| replica_parallel_type                  | LOGICAL_CLOCK  |
| replica_parallel_workers               | 16             |
| replica_preserve_commit_order          | ON             |
| transaction_write_set_extraction       | XXHASH64       |
+----------------------------------------+----------------+

And take a look at https://gist.github.com/lefred/5286cc89b4837ca92d4770a28a1aecda

You could use similar query to also add trending to replication:

select * from sys.replication_status;
+---------+----------+-----------+---------+----------------+-------------------+------------+--------------------------------------------+--------------------------------------------+
| channel | io_state | sql_state | latency | transport_time | time_to_relay_log | apply_time | last_queued_transaction                    | last_applied_transaction                   |
+---------+----------+-----------+---------+----------------+-------------------+------------+--------------------------------------------+--------------------------------------------+
|  (1)    | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          | 2.91 ms    | 00022233-1111-1111-1111-111111111111:10821 | 00022233-1111-1111-1111-111111111111:10821 |
|  (2)    | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (3)    | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (4)    | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (5)    | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (6)    | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (7)    | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (8)    | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (9)    | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (10)   | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (11)   | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (12)   | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (13)   | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (14)   | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (15)   | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
|  (16)   | ON       | ON        |   0 ps  | 98.80 us       | 15.00 us          |   0 ps     | 00022233-1111-1111-1111-111111111111:10821 |                                            |
+---------+----------+-----------+---------+----------------+-------------------+------------+--------------------------------------------+--------------------------------------------+
16 rows in set (0.00 sec)
charles-001 commented 1 year ago

@lefred - thanks for your suggestion! I've added this in v3.0.5