sqlmesh
sqlmesh copied to clipboard
Feat: Introduce support for 'pre ping' to detect stale or lost connections
For long running plans, a state connection established at the beginning of a plan application might go stale by the end of it.
This update introduces a "pre-ping" mechanism, ensuring that the connection is not stale before initiating a new transaction. The ping implementation itself is dialect-specific but essentially comes down to executing a SELECT 1
query in all cases except MySQL, which has a first-class API for this purpose.
The new behavior is configurable and is turned off by default for all engines except for those likely to be used to store the SQLMesh state: MySQL, MSSQL, and Postgres.