sqlmesh icon indicating copy to clipboard operation
sqlmesh copied to clipboard

Feat: Introduce support for 'pre ping' to detect stale or lost connections

Open izeigerman opened this issue 2 months ago • 0 comments

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.

izeigerman avatar May 17 '24 22:05 izeigerman