-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HACK: solo delivery: update tempfile for each helper invocation
This is a horrible hack that should not land on trunk. The solo-to-chain delivery pathway has a bug in which heavy-ish traffic (a load generator which emits messages faster than once per block or two) causes a queue to build up without bound, causing message delivery to fall further and further behind. Each helper invocation sends a few more messages, but does not send *all* the remaining messages. Given enough traffic, this can lead to a queue that takes days to drain, when it could really be processed in under a minute. We need to overhaul this delivery pathway (#2855). This patch is a quick and dirty hack to get a load-generator running faster than one cycle per 20s. It doesn't drain the queue any faster, but each time it invokes the helper to send a few messages, it calls back into the mailbox to copy *all* the current messages out. The helper arguments (including the tempfile name) are already fixed and recorded in the queue, but this hack just replaces the *contents* of the tempfile just before invoking the helper. We still have a queue that takes days to drain, but once the load generation frontend is turned off, the actual new messages are delivered within a block or two, and the remaining day of activity consists entirely of empty or duplicate messages, which the chain then correctly ignores.
- Loading branch information
Showing
3 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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