blazingmq
blazingmq copied to clipboard
dev: Optimize counting of unconfirmed
First step in optimizing shutdown logic. The goal of which is to avoid iterating subStreams (preparing for Reliable Broadcast).
The ClusterQueueHelper::d_counterOfUnconfirmed is all we will need for shutdown in the next step.
All other counters will (gradually) retire.
Have some comments, the most important one, are we sure that the loop over downstreams is actually slow?
For the ReliableBroadcast, yes. Consider thread switching too. AtomicInt seems to be a small price for replacing it.
Reverting to the old way of counting. A relevant PR is https://github.com/bloomberg/blazingmq/pull/399