You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
version:2.6.3
mode:mysql group replication
system:centos8
I am using Hikari connection pool and JDBC template to query data (select count (*) from table) for lag data validation. I found that lagging data can be queried, but I directly changed to using JDBC's driverManager.getConnection() retrieves new connections and executes the same query data each time
problem analysis
Connection pool (such as HikariCP): A connection pool establishes and maintains a certain number of database connections in advance. These connections were already directed to specific MySQL server instances at the time of creation. If ProxySQL detects a delay in a server instance and decides not to route new queries to that instance, but established connections still point to that instance, queries executed through these connections may still return old data.
Driver Manager: Every time a connection is obtained through Driver Manager, a new connection is established. If ProxySQL has updated its routing rules based on the state of MGR, new connections will follow these rules, making it more likely to connect to the server instance with the latest data.
expect
The established connection should also implement the backend MySQL server replication lag avoidance strategy
The text was updated successfully, but these errors were encountered:
version:2.6.3
mode:mysql group replication
system:centos8
I am using Hikari connection pool and JDBC template to query data (select count (*) from table) for lag data validation. I found that lagging data can be queried, but I directly changed to using JDBC's driverManager.getConnection() retrieves new connections and executes the same query data each time
problem analysis
Connection pool (such as HikariCP): A connection pool establishes and maintains a certain number of database connections in advance. These connections were already directed to specific MySQL server instances at the time of creation. If ProxySQL detects a delay in a server instance and decides not to route new queries to that instance, but established connections still point to that instance, queries executed through these connections may still return old data.
Driver Manager: Every time a connection is obtained through Driver Manager, a new connection is established. If ProxySQL has updated its routing rules based on the state of MGR, new connections will follow these rules, making it more likely to connect to the server instance with the latest data.
expect
The established connection should also implement the backend MySQL server replication lag avoidance strategy
The text was updated successfully, but these errors were encountered: