Treat the populate reply wait as an idle timeout so large indexes can finish#42
Open
mussbach wants to merge 1 commit into
Open
Treat the populate reply wait as an idle timeout so large indexes can finish#42mussbach wants to merge 1 commit into
mussbach wants to merge 1 commit into
Conversation
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.
In
QueuePagerPersister::insert()the page-messages are all dispatched first, then the sender waits for replies withlimit_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 withOverall reply time … exceededeven 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_timenow behaves as a per-reply idle window rather than a wall-clock budget for the whole drain.