-- build used commit: 683372e870fea4430bafe8bf06ef6f06a234e539 date: 2022-12-16 13:56:25 +0100 build-date: 2022-12-16 15:36:03 +0000 short: 683372e870f branch: mysql-8.0.32-release MySQL source 8.0.32 -- Set path export PATH=$PATH:/export/home/tmp/ushastry/mysql-8.0.32/bin:/export/home/tmp/ushastry/mysql-shell-8.0.32/bin -- create 3 node cluster [umshastr@support-cluster03:/export/home/tmp/ushastry/mysql-shell-8.0.32]$ export PATH=$PATH:/export/home/tmp/ushastry/mysql-8.0.32/bin:/export/home/tmp/ushastry/mysql-shell-8.0.32/bin [umshastr@support-cluster03:/export/home/tmp/ushastry/mysql-shell-8.0.32]$ bin/mysqlsh --log-level=debug3 MySQL Shell 8.0.32 Copyright (c) 2016, 2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type '\help' or '\?' for help; '\quit' to exit. MySQL JS > MySQL JS > dba.deploySandboxInstance(3350) A new MySQL sandbox instance will be created on this host in /home/umshastr/mysql-sandboxes/3350 Warning: Sandbox instances are only suitable for deploying and running on your local machine for testing purposes and are not accessible from external networks. Please enter a MySQL root password for the new instance: Deploying new MySQL instance... Instance localhost:3350 successfully deployed and started. Use shell.connect('root@localhost:3350') to connect to the instance. MySQL JS > dba.deploySandboxInstance(3360) A new MySQL sandbox instance will be created on this host in /home/umshastr/mysql-sandboxes/3360 Warning: Sandbox instances are only suitable for deploying and running on your local machine for testing purposes and are not accessible from external networks. Please enter a MySQL root password for the new instance: Deploying new MySQL instance... Instance localhost:3360 successfully deployed and started. Use shell.connect('root@localhost:3360') to connect to the instance. MySQL JS > dba.deploySandboxInstance(3370) A new MySQL sandbox instance will be created on this host in /home/umshastr/mysql-sandboxes/3370 Warning: Sandbox instances are only suitable for deploying and running on your local machine for testing purposes and are not accessible from external networks. Please enter a MySQL root password for the new instance: Deploying new MySQL instance... Instance localhost:3370 successfully deployed and started. Use shell.connect('root@localhost:3370') to connect to the instance. MySQL JS > \connect root@localhost:3350 Creating a session to 'root@localhost:3350' Please provide the password for 'root@localhost:3350': Save password for 'root@localhost:3350'? [Y]es/[N]o/Ne[v]er (default No): Fetching schema names for auto-completion... Press ^C to stop. Your MySQL connection id is 11 Server version: 8.0.32 MySQL Community Server - GPL No default schema selected; type \use to set one. MySQL localhost:3350 ssl JS > MySQL localhost:3350 ssl JS > cluster = dba.createCluster("bug32050975") A new InnoDB Cluster will be created on instance '127.0.0.1:3350'. Validating instance configuration at localhost:3350... NOTE: Instance detected as a sandbox. Please note that sandbox instances are only suitable for deploying test clusters for use within the same host. This instance reports its own address as 127.0.0.1:3350 Instance configuration is suitable. NOTE: Group Replication will communicate with other members using '127.0.0.1:3350'. Use the localAddress option to override. Creating InnoDB Cluster 'bug32050975' on '127.0.0.1:3350'... Adding Seed Instance... Cluster successfully created. Use Cluster.addInstance() to add MySQL instances. At least 3 instances are needed for the cluster to be able to withstand up to one server failure. MySQL localhost:3350 ssl JS > cluster.addInstance("root@localhost:3360") NOTE: The target instance '127.0.0.1:3360' has not been pre-provisioned (GTID set is empty). The Shell is unable to decide whether incremental state recovery can correctly provision it. The safest and most convenient way to provision a new instance is through automatic clone provisioning, which will completely overwrite the state of '127.0.0.1:3360' with a physical snapshot from an existing cluster member. To use this method by default, set the 'recoveryMethod' option to 'clone'. The incremental state recovery may be safely used if you are sure all updates ever executed in the cluster were done with GTIDs enabled, there are no purged transactions and the new instance contains the same GTID set as the cluster or a subset of it. To use this method by default, set the 'recoveryMethod' option to 'incremental'. Please select a recovery method [C]lone/[I]ncremental recovery/[A]bort (default Clone): Validating instance configuration at localhost:3360... NOTE: Instance detected as a sandbox. Please note that sandbox instances are only suitable for deploying test clusters for use within the same host. This instance reports its own address as 127.0.0.1:3360 Instance configuration is suitable. NOTE: Group Replication will communicate with other members using '127.0.0.1:3360'. Use the localAddress option to override. A new instance will be added to the InnoDB Cluster. Depending on the amount of data on the cluster this might take from a few seconds to several hours. Adding instance to the cluster... Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background. Clone based state recovery is now in progress. NOTE: A server restart is expected to happen as part of the clone process. If the server does not support the RESTART command or does not come back after a while, you may need to manually start it back. * Waiting for clone to finish... NOTE: 127.0.0.1:3360 is being cloned from 127.0.0.1:3350 ** Stage DROP DATA: Completed ** Clone Transfer FILE COPY ############################################################ 100% Completed PAGE COPY ############################################################ 100% Completed REDO COPY ############################################################ 100% Completed NOTE: 127.0.0.1:3360 is shutting down... * Waiting for server restart... ready * 127.0.0.1:3360 has restarted, waiting for clone to finish... ** Stage RESTART: Completed * Clone process has finished: 73.75 MB transferred in about 1 second (~73.75 MB/s) State recovery already finished for '127.0.0.1:3360' The instance '127.0.0.1:3360' was successfully added to the cluster. MySQL localhost:3350 ssl JS > cluster.addInstance("root@localhost:3370") NOTE: The target instance '127.0.0.1:3370' has not been pre-provisioned (GTID set is empty). The Shell is unable to decide whether incremental state recovery can correctly provision it. The safest and most convenient way to provision a new instance is through automatic clone provisioning, which will completely overwrite the state of '127.0.0.1:3370' with a physical snapshot from an existing cluster member. To use this method by default, set the 'recoveryMethod' option to 'clone'. The incremental state recovery may be safely used if you are sure all updates ever executed in the cluster were done with GTIDs enabled, there are no purged transactions and the new instance contains the same GTID set as the cluster or a subset of it. To use this method by default, set the 'recoveryMethod' option to 'incremental'. Please select a recovery method [C]lone/[I]ncremental recovery/[A]bort (default Clone): Validating instance configuration at localhost:3370... NOTE: Instance detected as a sandbox. Please note that sandbox instances are only suitable for deploying test clusters for use within the same host. This instance reports its own address as 127.0.0.1:3370 Instance configuration is suitable. NOTE: Group Replication will communicate with other members using '127.0.0.1:3370'. Use the localAddress option to override. A new instance will be added to the InnoDB Cluster. Depending on the amount of data on the cluster this might take from a few seconds to several hours. Adding instance to the cluster... Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background. Clone based state recovery is now in progress. NOTE: A server restart is expected to happen as part of the clone process. If the server does not support the RESTART command or does not come back after a while, you may need to manually start it back. * Waiting for clone to finish... NOTE: 127.0.0.1:3370 is being cloned from 127.0.0.1:3360 ** Stage DROP DATA: Completed ** Clone Transfer FILE COPY ############################################################ 100% Completed PAGE COPY ############################################################ 100% Completed REDO COPY ############################################################ 100% Completed NOTE: 127.0.0.1:3370 is shutting down... * Waiting for server restart... ready * 127.0.0.1:3370 has restarted, waiting for clone to finish... ** Stage RESTART: Completed * Clone process has finished: 73.66 MB transferred in about 1 second (~73.66 MB/s) State recovery already finished for '127.0.0.1:3370' The instance '127.0.0.1:3370' was successfully added to the cluster. MySQL localhost:3350 ssl JS > cluster.status() { "clusterName": "bug32050975", "defaultReplicaSet": { "name": "default", "primary": "127.0.0.1:3350", "ssl": "REQUIRED", "status": "OK", "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.", "topology": { "127.0.0.1:3350": { "address": "127.0.0.1:3350", "memberRole": "PRIMARY", "mode": "R/W", "readReplicas": {}, "replicationLag": "applier_queue_applied", "role": "HA", "status": "ONLINE", "version": "8.0.32" }, "127.0.0.1:3360": { "address": "127.0.0.1:3360", "memberRole": "SECONDARY", "mode": "R/O", "readReplicas": {}, "replicationLag": "applier_queue_applied", "role": "HA", "status": "ONLINE", "version": "8.0.32" }, "127.0.0.1:3370": { "address": "127.0.0.1:3370", "memberRole": "SECONDARY", "mode": "R/O", "readReplicas": {}, "replicationLag": "applier_queue_applied", "role": "HA", "status": "ONLINE", "version": "8.0.32" } }, "topologyMode": "Single-Primary" }, "groupInformationSourceMember": "127.0.0.1:3350" } MySQL localhost:3350 ssl JS > ## Now try to connect primary node and query performance_schema.binary_log_transaction_compression_stats bin/mysql -uroot -S /home/umshastr/mysql-sandboxes/3350/sandboxdata/mysqld.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 74 Server version: 8.0.32 MySQL Community Server - GPL Copyright (c) 2000, 2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select * from performance_schema.binary_log_transaction_compression_stats\G *************************** 1. row *************************** LOG_TYPE: BINARY COMPRESSION_TYPE: NONE TRANSACTION_COUNTER: 83 COMPRESSED_BYTES_COUNTER: 47068 UNCOMPRESSED_BYTES_COUNTER: 47068 COMPRESSION_PERCENTAGE: 0 FIRST_TRANSACTION_ID: 4f62d15f-a392-11ed-973e-020017078e24:1 FIRST_TRANSACTION_COMPRESSED_BYTES: 290 FIRST_TRANSACTION_UNCOMPRESSED_BYTES: 290 FIRST_TRANSACTION_TIMESTAMP: 2023-02-03 08:16:12.346728 LAST_TRANSACTION_ID: a36d79ac-a392-11ed-baf9-020017078e24:74 LAST_TRANSACTION_COMPRESSED_BYTES: 2773 LAST_TRANSACTION_UNCOMPRESSED_BYTES: 2773 LAST_TRANSACTION_TIMESTAMP: 2023-02-03 08:17:28.022368 *************************** 2. row *************************** LOG_TYPE: RELAY COMPRESSION_TYPE: NONE TRANSACTION_COUNTER: 5 COMPRESSED_BYTES_COUNTER: 18446744073709551211 UNCOMPRESSED_BYTES_COUNTER: 18446744073709551211 COMPRESSION_PERCENTAGE: 0 FIRST_TRANSACTION_ID: a36d7e75-a392-11ed-baf9-020017078e24:1 FIRST_TRANSACTION_COMPRESSED_BYTES: 18446744073709551535 FIRST_TRANSACTION_UNCOMPRESSED_BYTES: 18446744073709551535 FIRST_TRANSACTION_TIMESTAMP: 2092-08-10 07:17:20.261567 LAST_TRANSACTION_ID: a36d7e75-a392-11ed-baf9-020017078e24:5 LAST_TRANSACTION_COMPRESSED_BYTES: 18446744073709551535 LAST_TRANSACTION_UNCOMPRESSED_BYTES: 18446744073709551535 LAST_TRANSACTION_TIMESTAMP: 2092-08-10 07:29:41.499004 <-------------------------------- looks abnormal 2 rows in set (0.00 sec) mysql> mysql> show global variables like 'binlog_transaction_%'; +--------------------------------------------+----------+ | Variable_name | Value | +--------------------------------------------+----------+ | binlog_transaction_compression | OFF | | binlog_transaction_compression_level_zstd | 3 | | binlog_transaction_dependency_history_size | 25000 | | binlog_transaction_dependency_tracking | WRITESET | +--------------------------------------------+----------+ 4 rows in set (0.00 sec) mysql> show variables like '%version%'; +--------------------------------------------------+------------------------------+ | Variable_name | Value | +--------------------------------------------------+------------------------------+ | admin_tls_version | TLSv1.2,TLSv1.3 | | group_replication_allow_local_lower_version_join | OFF | | group_replication_recovery_tls_version | TLSv1.2,TLSv1.3 | | immediate_server_version | 999999 | | innodb_version | 8.0.32 | | original_server_version | 999999 | | protocol_version | 10 | | replica_type_conversions | | | slave_type_conversions | | | tls_version | TLSv1.2,TLSv1.3 | | version | 8.0.32 | | version_comment | MySQL Community Server - GPL | | version_compile_machine | x86_64 | | version_compile_os | Linux | | version_compile_zlib | 1.2.13 | +--------------------------------------------------+------------------------------+ 15 rows in set (0.00 sec) mysql>