-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixing test flappers * Fixing test that potentially hangs * Fix consume pending msgs to stay positive In test sometimes we're receiving batch requests more than the requested maxMsgs. To eliminate the possibility of having batch size going over the max now we can make sure the pending messages doesn't go below zero, os that there is no way for a pull request batch to go over max msgs. * Fixed request reply test timeout * Fixed extraneous pull request In some cases in test we send an unnecessary pull request with batch=0 the only place this could happen is in CheckPending() so we add an additional check for pending messages there. * Avoid pending update races * Hunting consume heartbeat test failure There is an extraneous pull request sent at the very beginning of the consume. * Fixed format and warnings * Fix initial pull request race In rare cases we were getting two pull requests issued back-to-back, one for the initialization then right after that with an incoming message triggering another request because the pending numbers were nor reset soon enough after the initial request. initialization | message loop ------------------------------------------ pull() | | incoming_message() | check_pending() (*)--> reset_pending() | | pull() | reset_pending() (*) Too late. Check thinks we don't have enough pending messages so issues another pull request. By setting setting the pending requests in constructor to full values, assuming a pull request will be done right after subscription solves the race condition where reset_pending() might happen just after the first message. initialization | message loop ------------------------------------------ reset_pending() | pull() | | incoming_message() | check_pending() (*)--> | | (*) Now check thinks we have enough pending messages so doesn't issues a pull request.
- Loading branch information
Showing
6 changed files
with
133 additions
and
82 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
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
Oops, something went wrong.