Commit ed42218
committed
fix(driver-sql): only cache sequences-ready flag when DDL ran durably
Harden the lazy ensureSequencesTable fallback: when the table is created
on the caller's transaction (SQLite in-tx path), the create is
commit-conditional — a rollback would drop it. Cache sequencesTableReady
only when the DDL ran on a durable pooled connection (this.knex); on the
in-tx path leave the flag unset so the next write cheaply re-verifies via
hasTable instead of trusting a stale process-level flag. initObjects
still sets it durably up front, so the hot path is unchanged.1 parent 1a5bc63 commit ed42218
2 files changed
Lines changed: 9 additions & 2 deletions
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
779 | | - | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
780 | 786 | | |
781 | 787 | | |
782 | 788 | | |
| |||
0 commit comments