uber-archive / cherami-server

Distributed, scalable, durable, and highly available message queue system. This project is deprecated and not maintained.
https://eng.uber.com/cherami/
MIT License
1.42k stars 102 forks source link

ConcurrentMap size calculation is wrong? #338

Open wxing1292 opened 6 years ago

wxing1292 commented 6 years ago

Please see the followings:

  1. Remove decrement the counter with no checking of whether key exists or not: https://github.com/uber/cherami-server/blob/master/common/concurrentmap.go#L173

  2. Put increase the counter with no checking of whether key exists or not: https://github.com/uber/cherami-server/blob/master/common/concurrentmap.go#L148