When running clientConn.handleQuery
/ clientConn.handleStmtExecute
, if we get ErrTiFlashServerTimeout
error and the execution of SQL does’t have side effect (If TiDB server already sends data to client or the execution is in cursor mode, the execution has side effect), we delete TiFlash from IsolationReadEngines
, retry executing the SQL and add TiFlash back to IsolationReadEngines
. Besides, we use a switch tidb_enable_tiflash_fallback_tikv
to control whether to retry and the switch is off by default.