-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
Service Arch 2022-06-27, Service Arch 2022-07-11
-
None
-
None
-
None
-
None
-
None
-
None
-
None
During development, I've received the following idea it might be interesting to pursue as a follow-up to the work which has already been done in SERVER-65987.
The argument for it is that the produced version was verbose and may lead to errors. Here's the link for the complete discussion.
/**
* Mostly can be declarad and used wherever and however
* a `Counter64` can be used, but it's backed by a metric.
*/
class CounterMetric {
public:
CounterMetric(std::string name)
: _counter{makeServerStatusCounter(std::move(name)).value()} {}
CounterMetric(CounterMetric&) = delete;
CounterMetric& operator=(CounterMetric&) = delete;
operator Counter64& () { return _counter; }
void increment() { return _counter.increment(); } // + other common ops.
private:
Counter64& _counter;
};
- duplicates
-
SERVER-65987 ServerStatusMetric API refresh
-
- Closed
-
- related to
-
SERVER-67647 Potentially optimize mongo::MetricTree internal representation
-
- Open
-
-
SERVER-67644 Certain ServerStatusMetricFields can lead to a data race
-
- Closed
-