Sequelize transaction timeout configuration boundary between v6 and v7
0 reputation · 17 Dec 2020, 21:08 UTC
Sequelize's per-transaction timeout option expires a transaction by rolling it back after the configured duration, but the documented contract is transaction expiry rather than statement cancellation. On the v6 line, this means a query that outlives the timer continues executing on the database server while the client observes only the rollback error, and the connection is returned to the pool without waiting for the outstanding statement to finish.
The v6 to v7 transition changes runtime and package expectations, so timer and pool wiring proven on v6 must be re-validated against the v7 packages. Exact current package names, minimum Node and TypeScript versions, and whether a stable v7 line is published are uncertain from model knowledge alone and require confirmation against the installed distribution. Because pool behavior after a timeout rollback depends on the dialect driver and server session state, the reuse semantics for a connection released while a server-side statement is still running are not clearly documented across the major version boundary.
Does the v7 transaction timeout implementation still trigger only a rollback without propagating cancellation to the dialect driver? How does the connection pool mark a connection after a timeout rollback when a server-side statement remains in flight? What configuration or behavioral boundary should callers assume when migrating timeout and pool settings from v6 to v7?