blazingmq icon indicating copy to clipboard operation
blazingmq copied to clipboard

dev: Optimize counting of unconfirmed

Open dorjesinpo opened this issue 1 year ago • 1 comments

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.

dorjesinpo avatar Jul 18 '24 19:07 dorjesinpo

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.

dorjesinpo avatar Jul 22 '24 22:07 dorjesinpo

Reverting to the old way of counting. A relevant PR is https://github.com/bloomberg/blazingmq/pull/399

dorjesinpo avatar Aug 15 '24 14:08 dorjesinpo