Why is there a negative number in the replication lag in Percona MySQL Shell? (Innodb Cluster)

 MySQL  localhost  JS > a.status()
{
    "clusterName": "rockCluster",
    "defaultReplicaSet": {
        "name": "default",
        "primary": "node2:3306",
        "ssl": "REQUIRED",
        "status": "OK",
        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
        "topology": {
            "node1:3306": {
                "address": "node1:3306",
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "00:00:00.612635",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.33"
            },
            "node2:3306": {
                "address": "node2:3306",
                "memberRole": "PRIMARY",
                "mode": "R/W",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.33"
            },
            "node3:3306": {
                "address": "node3:3306",
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "-00:00:07.330298",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.33"
            }
        },
        "topologyMode": "Single-Primary"
    },
    "groupInformationSourceMember": "node2:3306"
}

Load testing using sysbench. Why does the negative value appear? (node3)
Tested with default setting of oltp_read_write.lua.

The shell version is percona 8.0.34.

As DB version is 8.0.33, please try the same [cluster.status()] with shell version 8.0.33? Is it repeatable with shell 8.0.33 as well?

In various DB versions (8.0.32, 8.0.33, 8.0.21…), we want to manage it in an integrated way using Shell. I’m currently using only one shell version, so would it be better to match the shell version compatibly?

Yes, It is recommended to keep your MySQL shell client version similar to your DB version.

1 Like