Skip to content

feat(ha): enhance MySQL InnoDB Cluster & Group Replication diagnostics #976

Description

@jmrenouard

Summary & Motivation

Enhance MySQLTuner diagnostics and analytics for MySQL InnoDB Cluster and Group Replication topologies:

  1. Advanced MySQL Router Metrics & Query Categorization: Parse processlist for MySQL Router connections, monitor active vs sleeping router sessions, and detect/warn when write statements (INSERT, UPDATE, DELETE, DDL) are routed to SECONDARY cluster nodes.
  2. Dynamic Single-Primary vs Multi-Primary Mode Adaptation: Adapt flow control recommendations and lower certification conflict rollback warning threshold from 5.0% to 2.0% when running in Multi-Primary mode (group_replication_single_primary_mode = OFF).
  3. Message Cache Retention Capacity Audit: Cross-reference group_replication_message_cache_size against active network traffic throughput (Bytes_sent + Bytes_received / Uptime) to calculate estimated network isolation retention window and warn if retention < 60 seconds to prevent state transfer (SST) recovery spikes.
  4. Topology Status Output: Standardize output for MEMBER_STATE and MEMBER_ROLE across all cluster nodes.

Changes Included

  • Updated mysqltuner.pl with Group Replication and Router diagnostic enhancements.
  • Added comprehensive unit subtests in tests/unit_ha_cluster.t.
  • Validated via E2E lab tests (build/test_ha.sh innodb_cluster).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions