Mathias Bogaert
Mathias Bogaert
Replace os.ErrInvalid check with syscall.EINVAL when handling unmount errors. This is more precise as syscall.EINVAL is the actual error returned when attempting to unmount an already unmounted path. The functionality...
- Update to use atomic.Int64 instead of function-based atomic operations - Maintain backward compatibility with existing behavior This change modernizes the code to use Go 1.19+ atomic types while improving...
Improve performance of the countingWaitGroup implementation while maintaining the original behavior: - Use atomic.Int64 for the counter to enable lock-free Count() reads - Keep mutex synchronization for Add() and Done()...
Replace the custom map implementation with mutex-based locking with Go's built-in sync.Map for improved concurrency handling. This change simplifies the code by: - Eliminating the need for manual RWMutex locking...
- Replace pointer to int64 with atomic.Int64 type - Use Store() and Add() methods directly on atomic type This change modernizes the code to use the atomic types introduced in...
- Pre-allocate attribute maps with exact capacity to avoid resizing - Improve memory efficiency during high-volume metric collection - Reduce garbage collection pressure from repeated map allocations
Replaces the map and mutex combination in the connection tracker with Go's built-in sync.Map implementation. This change simplifies the code by eliminating explicit mutex locking while maintaining thread safety. sync.Map...
Removed the external code.cloudfoundry.org/urljoiner dependency in favor of a more direct string concatenation approach for URL construction.
Replace the manually synchronized map with sync.Map in the Repository implementation to improve concurrent access performance. The refactoring: - Removes explicit locking/unlocking code - Adapts methods to use sync.Map's API...
Pre-compile the regular expressions used to detect missing executables to improve performance and avoid repeated compilation during container runtime.