All Products
Search
Document Center

PolarDB:FAQ

Last Updated:Jun 25, 2025

This topic provides frequently asked questions (FAQ) about the global consistency (high-performance mode) feature.

I do not want to implement global consistency for specific read requests that are forwarded to a read-only node after I enable the global consistency (high-performance mode) feature for the read-only node. What do I do?

After the global consistency (high-performance mode) feature is enabled for a read-only node, the feature takes effect on all the new read requests that are forwarded to the read-only node by default. If you do not want to implement global consistency (high-performance mode) for specific read requests that are forwarded to the read-only node, you can run the following command to disable this feature for the read requests:

SET Session innodb_polar_scc = OFF
Note

You can disable global consistency (high-performance mode) for the read requests that are forwarded to a read-only node only if your cluster runs one of the following database engine versions:

  • PolarDB for MySQL 8.0.2 (revision version 8.0.2.2.16 or later).

  • PolarDB for MySQL 8.0.1 (revision version 8.0.1.1.33 or later).

  • PolarDB for MySQL 5.7 (revision version 5.7.1.0.28 or later).

How do I set a timeout period for read requests for which I implement global consistency (high-performance mode)?

Log on to the PolarDB console. In the PolarDB console, configure the loose_innodb_polar_scc_wait_timeout parameter to specify a timeout period for read requests for which you implement global consistency (high-performance mode). If a timeout occurs, the client receives the following error message:

Wait replication complete timeout, please retry
Note
  • If a large number of write requests are forwarded to a PolarDB for MySQL cluster or the number of write requests that are forwarded to the PolarDB for MySQL cluster fluctuates, you can set the loose_innodb_polar_scc_wait_timeout parameter to a greater value.

  • If your cluster runs one of the following database engine versions, you must rebuild the connections for the configuration change to take effect. Existing connections continue to use the original setting until they are rebuilt.

    • PolarDB for MySQL 8.0.2 (revision version 8.0.2.2.29 or later).

    • PolarDB for MySQL 8.0.1 (revision version 8.0.1.1.48 or later).

    • PolarDB for MySQL 5.7 (revision version 5.7.1.0.38 or later).

How does PolarDB forward read requests if the read requests for which I implement global consistency time out?

  • If the global consistency (high-performance mode) feature is enabled for a cluster of PolarDB for MySQL 5.7, PolarDB forwards read requests based on the following mechanism:

    • If the read requests that are routed to a read-only node over the cluster endpoint time out, PolarProxy automatically forwards the read request to the primary node. The client does not receive an error message.

    • If such read requests time out and no primary node is attached to the cluster, PolarProxy does not forward the read request to the primary node.

  • If the global consistency (high-performance mode) feature is enabled for a cluster of PolarDB for MySQL 8.0, PolarDB forwards read requests based on the following mechanism:

    • For PolarProxy whose version is 2.8.36 or later:

      • If the read requests that are routed to a read-only node over the cluster endpoint time out, PolarProxy automatically forwards the read requests to the primary node. The client does not receive an error message.

      • If the read requests that are routed to a read-only node over a read-only endpoint time out and no primary node is attached to the cluster, PolarProxy does not forward the read requests to the primary node.

    • For PolarProxy whose version is earlier than 2.8.36:

      • If the read requests that are routed to a read-only node over any endpoint time out, PolarProxy does not forward the read requests to the primary node.

      • You can change the timeout period by modifying the loose_innodb_polar_scc_wait_timeout parameter.

How do I downgrade read requests for which I implement global consistency to regular read requests if such read requests time out?

Log on to the PolarDB console. In the PolarDB console, set the loose_innodb_polar_scc_timeout_degrade parameter to ON. Then, if the read requests for which you implement global consistency (high-performance mode) time out, the read requests are downgraded to regular requests and the client does not receive an error message.

Note

If your cluster runs one of the following database engine versions, you must rebuild the connections for the configuration change to take effect. Existing connections continue to use the original setting until they are rebuilt.

  • PolarDB for MySQL 8.0.2 (revision version 8.0.2.2.29 or later).

  • PolarDB for MySQL 8.0.1 (revision version 8.0.1.1.48 or later).

  • PolarDB for MySQL 5.7 (revision version 5.7.1.0.38 or later).

How do I minimize the read latency in scenarios in which a small number of write requests are processed?

Log on to the PolarDB console. In the PolarDB console, set the innodb_flush_log_at_trx_commit parameter to 1.