Skip to content
  • Nathan Harris's avatar
    Fix data race with `RedisMetrics.activeConnectionCount` · 939e41b8
    Nathan Harris authored
    Motivation:
    
    After enabling the thread sanitizer during testing, a data race with the `activeConnectionCount` in `RedisMetrics` was caught due to changing a primitive `Int` across threads.
    
    Modifications:
    
    Add a specialized class `ActiveConnectionGauge` to wrap the semantics of the `activeConnectionCount` with an `Atomic<Int>` property.
    
    Result:
    
    No data races should occur with the `RedisMetrics` subsystem.
    939e41b8