-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix HTTP reporter potential unbounded goroutine creation (#146)
* Fix HTTP reporter potential unbounded goroutine creation Currently the HTTP reporter spawns a new goroutine each time a new batch needs to be sent to the server. Execution of those goroutines gets serialized through the `sendMtx`. This behavior is problematic when the zipkin server is down and leads to creation of unbounded number of goroutines each of which will wait for its turn on the `sendMtx` and then fail. Fix this by creating one send goroutine to handle sending data to the server. This also removes the need for the `sendMtx` since `sendBatch` will only be called by the send goroutine. Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com> * Add more HTTP reporter test cases Add HTTP reporter test cases for BatchInterval() and BatchSize() options behavior. Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
- Loading branch information
Showing
2 changed files
with
133 additions
and
47 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