aristanetworks / aristanetworks/goeapi
Thread-safety issues
- Dominant language
- Go
- Stars
- 60
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I experience issues with that library when running multiple device connections in parallel go routines, I receive results from other devices when calling `connection.RunCommands`.
Adding a mutex around this solves the issue but comes with some performance downsides. Can you look into that maybe and provide a fix?
See https://github.com/G-PORTAL/switchmgr-go/blob/0deaa46315416a06dc0e2acc5f2a69237ca9e2a2/pkg/vendors/arista_eos/arista.go for implementation with mutex as workaround.
Thank you!
Regards
Alex
Contributor guide
Research direction
Start at the connection.RunCommands entry point and reproduce concurrent calls using multiple device connections. Compare the behavior with the mutex workaround shown in pkg/vendors/arista_eos/arista.go from switchmgr-go. Done means results remain associated with the correct device without requiring a broad mutex that causes the reported performance downside.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100