-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix how decoding errors are handled for UDP clients in collector (#352)
Previously, in case of a decoding error (e.g., an unknown template ID in a data set), the goroutine responsible for decoding messages would be stopped, but the client would not be deleted. This would lead to a deadlock as subsequent messages could not be written to the packetChan channel for the client, effectively breaking the UDP collecting process completely. To avoid this issue, we log an error when decoding fails, but keep the client alive. Note that for IPFIX over UDP, there is no way to notify a single UDP client of an error (with TCP, we can close the connection if we want). This is also why the template refresh mechanism exists. We also fix possible race conditions in the UDP collecting process: all access to the clients map should be protected by locking the mutex. Signed-off-by: Antonin Bas <[email protected]>
- Loading branch information
1 parent
621ab6a
commit a4ae35d
Showing
6 changed files
with
139 additions
and
65 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
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