-
Joao Gramacho authored
Problem: When dealing with large GTID sets (bigger than 64K bytes when converted to string), the "performance_schema.replication_connection_status" is truncating the "RECEIVED_TRANSACTION_SET". Analysis: The "RECEIVED_TRANSACTION_SET" is created of type TEXT, and supports strings up to 64K bytes of size. When dealing with large/complex clusters of servers using replication it is possible that sometimes the GTID sets to handle have lots of holes, leading to very large GTID set strings. When trying to certify if a receiver thread has received all the GTIDs a master has executed, we can compare master's GTID_EXECUTED with the slave's channel "performance_schema.replication_connection_status" "RETRIEVED_GTID_SET" field. But because of the limitation of the max string length of a TEXT field type, this information will be truncated making a comparison to assume that the slave didn't received all the master's GTIDs yet. Fix: Changed the type of "RECEIVED_TRANSACTION_SET" field at "performance_schema.replication_connection_status" table from "TEXT" to "LONGTEXT". While fixing the issue, we also changed some Gtid_set functions return types and variable types from int to size_t or long in order to avoid future issues with the GTID set conversion to strings.
Joao Gramacho authoredProblem: When dealing with large GTID sets (bigger than 64K bytes when converted to string), the "performance_schema.replication_connection_status" is truncating the "RECEIVED_TRANSACTION_SET". Analysis: The "RECEIVED_TRANSACTION_SET" is created of type TEXT, and supports strings up to 64K bytes of size. When dealing with large/complex clusters of servers using replication it is possible that sometimes the GTID sets to handle have lots of holes, leading to very large GTID set strings. When trying to certify if a receiver thread has received all the GTIDs a master has executed, we can compare master's GTID_EXECUTED with the slave's channel "performance_schema.replication_connection_status" "RETRIEVED_GTID_SET" field. But because of the limitation of the max string length of a TEXT field type, this information will be truncated making a comparison to assume that the slave didn't received all the master's GTIDs yet. Fix: Changed the type of "RECEIVED_TRANSACTION_SET" field at "performance_schema.replication_connection_status" table from "TEXT" to "LONGTEXT". While fixing the issue, we also changed some Gtid_set functions return types and variable types from int to size_t or long in order to avoid future issues with the GTID set conversion to strings.
Loading