Skip to content

Treat the populate reply wait as an idle timeout so large indexes can finish#42

Open
mussbach wants to merge 1 commit into
php-enqueue:masterfrom
mussbach:idle-timeout
Open

Treat the populate reply wait as an idle timeout so large indexes can finish#42
mussbach wants to merge 1 commit into
php-enqueue:masterfrom
mussbach:idle-timeout

Conversation

@mussbach

Copy link
Copy Markdown

In QueuePagerPersister::insert() the page-messages are all dispatched first, then the sender waits for replies with limit_overall_reply_time (default 180s) enforced as a hard overall cap on the reply-draining phase.

That cap is fine when the consumers clear the backlog quickly, but it trips for large indexes: if the consumers need more than 180s to drain after dispatch (slow/contended cluster, modest consumer count, big index), insert() aborts with Overall reply time … exceeded even though the consumers are healthy and still replying — leaving the populate failed but the index partially written.

This reworks the cap into an idle timeout: the deadline is pushed forward on every received reply, so a steady stream of replies completes regardless of total runtime, while a genuine stall (all consumers dead → no reply within the window) still aborts. The exception message is updated to reflect the new meaning.

Single-file change to the reply loop; no API or config change. limit_overall_reply_time now behaves as a per-reply idle window rather than a wall-clock budget for the whole drain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant