You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve connection pool concurrency issues and enhance test coverage
This commit addresses several concurrency-related issues discovered during
the mutex refactoring and improves test coverage and documentation.
Fixes:
- Initialize connection pool dead slice to empty slice instead of nil
- Resolve scheduleResurrect deadlock by passing deadSince parameter
- Fix test deadlocks in connection_internal_test.go by extracting state before lock release
- Implement rwLocker interface methods for statusConnectionPool compatibility
- Update integration test to use new mutex-embedded pool access patterns
Improvements:
- Add test coverage for metrics incrementResponse method
- Add explanatory comments for connection resurrection logic and dead connection sorting
- Document concurrency tradeoffs in connection pool management
These changes ensure robust concurrent behavior and comprehensive test coverage
for the refactored mutex patterns introduced in the previous commit.
Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
0 commit comments