[SERVER-55996] Remove the invariant check for existence of _currentOp from resharding_metrics Created: 09/Apr/21  Updated: 29/Oct/23  Resolved: 21/Apr/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Kshitij Gupta Assignee: Kshitij Gupta
Resolution: Fixed Votes: 0
Labels: PM-234-M2.5, PM-234-T-autocommits
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-04-19, Sharding 2021-05-03
Participants:
Linked BF Score: 128
Story Points: 1

 Description   

After setting the error state, the resharding coordinator service's onCompletion() method calls the onCompletion() for ReshardingMetrics. ReshardingMetrics::onCompletion() will set the value of _currentOp to boost::none since there is no longer a current resharding operation. But the op log fetcher still tries to increment metrics after this is set since it is not aware that resharding has failed with an error and the resharding operation has been aborted. This operation fails on the invariant check for the existence of a current operation since it was already set to none in the previous step causing the test to abort with a failure.



 Comments   
Comment by Githook User [ 21/Apr/21 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-55996: Remove the invariant check for existence of _currentOp
from resharding_metrics.
Branch: master
https://github.com/mongodb/mongo/commit/2356323b3049fd0e5da21861dd3bd231c5c6e066

Generated at Thu Feb 08 05:38:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.