Repository navigation
Conversation
…next signal A backlog that is already in the queue produces no further insert notifications, so after reading one batch the consumer slept until the poll interval elapsed: a queue of N messages took ~N/batch * pollInterval (5 s by default) to drain.
Adds a pgmq service to compose.yaml (THESIS_PGMQ_DSN) and the first PgmqTransport tests: a backlog must drain without waiting for the poll interval, a consumer start must not wait for open producer transactions, and createQueue() must set up insert notifications.
pgmq.notify_insert_throttle is UNLOGGED: crash recovery (or a promoted replica) empties it, and the insert trigger then never notifies. The test removes the queue's row and expects a consumer (re)start to bring notifications back.
Recent PHPStan 2.2.x infers the nested property assignment correctly, so the ignore is unmatched and phpstan fails on every cell of the CI matrix (8.4/8.5 x lowest/highest). (cherry picked from commit ec45573)
Recent PHPStan 2.2.x infers the nested property assignment correctly, so the ignore is unmatched and phpstan fails on every cell of the CI matrix (8.4/8.5 x lowest/highest). (cherry picked from commit ec45573)
- 4 consumers (separate pools, like worker processes) starting at once on a queue without notifications create the trigger exactly once (counted with an event trigger); - a consumer start restores a disabled trigger.
…eue; listen on the lower-case channel
Recent PHPStan 2.2.x infers the nested property assignment correctly, so the ignore is unmatched and phpstan fails on every cell of the CI matrix (8.4/8.5 x lowest/highest).
…' into test/pgmq-notify-without-throttle-row-lock
…mq-notify-without-throttle-row-lock
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.
Integration tests for #9, on top of the pgmq test setup from #8.
The branch is stacked: it carries #8 (test setup), #6 (backlog drain) and #9 (the fix) so that every test here can pass on its own. The only new commit is "Test that senders do not serialize or deadlock on insert notifications"; once #6, #8 and #9 are in, the diff shrinks to that commit.
publishwakes the subscribed consumer, and only after commit;createQueue()removes the insert trigger of an earlier setup;createQueue()doesn't stall a busy queue while doing so.On the current 0.5.x the first two fail with a lock wait and
deadlock detected, and the trigger tests fail because the trigger is still there.concurrentConsumerStartsCreateTheTriggerOncefrom #8 is removed: with #9 consumers no longer create the trigger.