[SERVER-63152] Create ShardingDataTransformMetrics CumulativeMetrics Stub Class Created: 31/Jan/22  Updated: 29/Oct/23  Resolved: 15/Feb/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.3.0

Type: New Feature Priority: Major - P3
Reporter: Luis Osta (Inactive) Assignee: Brett Nawrocki
Resolution: Fixed Votes: 0
Labels: sharding-nyc-subteam1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2022-02-21
Participants:
Story Points: 2

 Description   

Simple example of what the class could look like

class CumulativeMetrics {
 
	std::atomic<counter> _cumulativeAggregatedValue;
	std::mutex _lock;
	std::list<SharedMetricsPtr> _instanceMetrics;
	
	SharedMetricsPtr createRegisteredSharedMetrics() {
		auto result = std::make_shared<SharedMetrics>();
		std::unique_lock guard(_lock);
		_instanceMetrics.push_back(result);
		return result;
	}
	
	void deregisterSharedMetrics(SharedMetricsPtr metrics) {
		std::unique_lock guard(_lock);
		_instanceMetrics.remove(metrics);
	}
}

This class will utilized the SharedMetrics class to manage the cross-instance metrics. It will be utilized by the external-facing CollectionDataCopyTransformedMetrics metrics class.



 Comments   
Comment by Githook User [ 15/Feb/22 ]

Author:

{'name': 'Brett Nawrocki', 'email': 'brett.nawrocki@mongodb.com', 'username': 'brettnawrocki'}

Message: SERVER-63152 Implement ShardingDataTransformCumulativeMetrics stub
Branch: master
https://github.com/mongodb/mongo/commit/1fa6d9faa1812f78ce97bbd988fca10b10946ead

Comment by Luis Osta (Inactive) [ 03/Feb/22 ]
  • Created class that supports metrics registration & de-registration
  • Added test for registration logic
Generated at Thu Feb 08 05:57:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.