chore(deps): minato ~> 0.18.10 for the prepared-statement fix - #56
Merged
Conversation
minato 0.18.10 (Taure/minato#41) makes prepared-statement names unique per connection. Before it, names came from a connection-local counter, which collides behind a transaction pooler: many connections are multiplexed onto few backends, two of them count from zero, and the second gets 42P05, `prepared statement "minato_30" already exists`. The floor moves from `~> 0.18` to `~> 0.18.10` rather than only refreshing the lock. `~> 0.18` still admits 0.18.5, so a clean checkout could resolve back onto a version with the collision - the lock was the only thing preventing it, and a lock is not a promise to anyone building from source. Worth taking seriously here specifically: a job queue's correctness rests on FOR UPDATE SKIP LOCKED claims inside a transaction, and a random query failure mid-claim is a much worse failure than a slow one.
🟠 Code Coverage — 57.4%1015 of 1769 lines covered. 🟡 ELP Lint — 1 warning1 diagnostic found. See job logs for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
minato 0.18.10 (Taure/minato#41) makes prepared-statement names unique per connection. Before it the name came from a connection-local counter, which collides behind a transaction pooler - many connections multiplexed onto few backends, two counting from zero, and the second gets
42P05 prepared statement "minato_30" already exists.The floor moves to
~> 0.18.10, not just the lock.~> 0.18still admits 0.18.5, so a clean checkout could resolve back onto a version with the collision. The lock was the only thing preventing it.Worth taking seriously in a job queue specifically: correctness rests on
FOR UPDATE SKIP LOCKEDclaims inside a transaction, and a query that fails at random mid-claim is a considerably worse failure mode than a slow one. The bug presents as random because which query dies depends on which backend the pooler hands out - see widgrensit/asobi#419, where it took out guest signup intermittently across every tenant of a production deployment.eunit 82, ct 110, xref / dialyzer / fmt clean.