tumblr / colossus

I/O and Microservice library for Scala
Apache License 2.0
1.14k stars 96 forks source link

fixing a race condition with hitting a rate from multiple threads #488

Closed DanSimon closed 7 years ago

DanSimon commented 7 years ago

Fixes #485 . This prevents a race condition that can occur when a rate is incremented from multiple threads at the same time, and the rate had never previously been hit before. Hits from multiple threads afterwards work correctly, so generally at most only 1 hit was lost.

codecov-io commented 7 years ago

Current coverage is 83.70% (diff: 100%)

Merging #488 into master will not change coverage

@@             master       #488   diff @@
==========================================
  Files            79         79          
  Lines          3940       3940          
  Methods        3611       3611          
  Messages          0          0          
  Branches        329        329          
==========================================
  Hits           3298       3298          
  Misses          642        642          
  Partials          0          0          

Powered by Codecov. Last update 73c30f2...b10f679