-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(concurrentbatchprocessor): Fix deadlock, test EarlyReturn feature (#257
) This tests and fixes a deadlock in the concurrent batch processor, one that was especially easy to see with EarlyReturn=true, however exists either way. The bug was introduced in #251 when it removed a `defer func()` from `consumeAndWait()` by mistake. This is now covered by testing. This is fixed w/o a `defer func() { ... }`. The older code was both counting responses and updating a semaphore. Now that we only count responses and do not update a semaphore, there is no need to defer. The batcher will avoid sending to the waiter when the waiter's context is canceled.
- Loading branch information
Showing
2 changed files
with
152 additions
and
19 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