The esqlite floor ~> 0.9 admits a q/3 that never finalizes its statement #30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (fix): the query store's busy answer (#28) runs only on an esqlite whose q/3 finalizes its statement, so the dependency cannot resolve to one that does not.
apps/project_bookclub/mix.exs:50 and apps/query_bookclub/mix.exs:33 ask for
{:esqlite, "~> 0.9"}, and the repo commits no mix.lock. That range admits 0.9.x. In esqlite 0.9.0, q/3 runs prepare, bind and fetchall with noafter, so the statement is not finalized when fetchall raises. 0.10.0 and 0.10.1 wrap it intry ... after finalize_query_statement(Statement).The instance that exposed it: the Erlang twin's fix (macula-services/mcl-bookclub#15, PR 16) catches q/3's
{case_clause, '$busy'}and relies on q/3 having finalized the statement. The fix for #28 here takes the same shape. On 0.9.x the statement is left for garbage collection while the connection is busy, which froze a scheduler in the twin's superseded attempt.Done when: both apps require esqlite >= 0.10.0, e.g.
~> 0.10, and the build still resolves 0.10.1.Refs #28. The Erlang twin is filed beside this one.
Landed with PR 29, main
04efa992f8(57cafbf): esqlite ~> 0.10 in project_bookclub and query_bookclub mix.exs. mix.lock already held 0.10.1. Erlang twin: macula-services/mcl-bookclub#17 (8b1c120f).