[SERVER-63153] Create ShardingDataTransformMetrics Individual Metrics Stub Class Created: 31/Jan/22  Updated: 29/Oct/23  Resolved: 16/Feb/22

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

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

Issue Links:
Depends
is depended on by SERVER-63618 Create & Integrate CurrentOp Interfac... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2022-02-21
Participants:
Story Points: 2

 Description   

This will a per-instance class that will handle all interactions between the Resharding/Global indexes metrics and external callers.

This is a simple example of what it could look like:

class IndividualMetrics {
	std::atomic<counter> _onlyIndividualsNeed;
	SharedMetricsPtr _sharedMetrics;
	CumulativeMetricsPtr _parent;
	
	IndividualMetrics(OperationContext* opCtx) {
		_parent = CumulativeMetrics::get(opCtx->getServiceContext());
        _sharedMetrics = _parent.createRegisteredSharedMetrics()
	}
	
	~IndividualMetrics() {
		_parent.deregisterSharedMetrics(_sharedMetrics);
	}
}



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

Author:

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

Message: SERVER-63153 Implement ShardingDataTransformInstanceMetrics stub
Branch: master
https://github.com/mongodb/mongo/commit/a2ee9ebefaae09ddf8078752db3c5e2014176166

Comment by Luis Osta (Inactive) [ 03/Feb/22 ]

Make the constructor take the CumulativeMetrics and create a function `makeIndividualMetrics` which the external callers will actually use (instead of using the constructor)

Comment by Luis Osta (Inactive) [ 03/Feb/22 ]

Acceptance Criteria:

  • Individual metrics class exists, handles registration and has no metrics listed.
  • Add test registration by constructing
Generated at Thu Feb 08 05:57:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.