generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improved locking of assembler state (#307)
<!-- Thank you for contributing to the project! 💜 Please see our [OSS process document](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md#) to get an idea of how we operate. --> ## Which problem is this PR solving? - #209 ## Short description of the changes During the debugging of suspected load testing issues, the following bugs were found and fixed: - Switch from `sync.Map` to regular map w/ mutex 3b8a008 - Ensure stats accessed concurrently are explicitly atomic fe2ebd3 - Remove unused `sync.Waitgroup` from TCP stream factory 2e039ad - Add packet counts for the foundMatch path in GetOrStore() ## How to verify that this has the expected result On my local Linux machine, I compiled the main branch and the changes in this PR, and ran them concurrently while sending several thousand HTTP requests to a random netcat server. The results are identical: Main: ``` DBG TCP assembler stats IPdefrag=0 active_streams=0 conn_rejected_FSM=0 event_queue_length=500 goroutines=6 rejected_FSM=0 rejected_Options=0 source_dropped=0 source_if_dropped=0 source_received=4000 total_TCP_bytes=97500 total_streams=500 uptime_ms=25450 6:33PM DBG Stopping TCP assembler assembler_page_usage="pageCache: used: 0:" closed=500 ``` PR: ``` DBG TCP assembler stats IPdefrag=0 active_streams=0 conn_rejected_FSM=0 event_queue_length=500 goroutines=6 rejected_FSM=0 rejected_Options=0 source_dropped=0 source_if_dropped=0 source_received=4000 total_TCP_bytes=97500 total_streams=500 uptime_ms=20920 6:33PM DBG Stopping TCP assembler assembler_page_usage="pageCache: used: 0:" closed=500 ``` --------- Signed-off-by: Dan Bond <danbond@protonmail.com> Co-authored-by: Robb Kidd <robb@thekidds.org>
- Loading branch information
Showing
4 changed files
with
65 additions
and
59 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