The esqlite floor ~> 0.9 admits a q/3 that never finalizes its statement #17
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 (#15) runs only on an esqlite whose q/3 finalizes its statement, so the dependency cannot resolve to one that does not.
rebar.config:63 asks for
{esqlite, "~> 0.9"}, and the repo commits no rebar.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: PR 16 (#15, landing) answers a held lock by catching q/3's
{case_clause, '$busy'}. Its comment and the review rely on q/3 having finalized the statement before it returns. On 0.9.x the statement is left for garbage collection while the connection is busy. That is the scheduler freeze that superseded5e88df2on PR 16. CI resolves 0.10.1 today, so nothing fails yet.Done when: the root rebar.config requires esqlite >= 0.10.0, e.g.
~> 0.10, and the build still resolves 0.10.1.Refs #15. The Phoenix twin is filed beside this one.
Landed: PR 18, main
8b1c120f6e. rebar.config now asks esqlite ~> 0.10, so the build cannot pick 0.9.0, whose q/3 does not finalize its statement (the #15 fix relies on it).