[DOCS-15602] [Server] Investigate changes in SERVER-68783: Recipient shard may incorrectly return 0 milliseconds remaining in resharding Created: 01/Sep/22  Updated: 13/Nov/23  Due: 17/Dec/22  Resolved: 12/Dec/22

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: 6.2.0-rc0, 6.1.0-rc2, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Joseph Dougherty
Resolution: Fixed Votes: 0
Labels: ready-for-work
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backported by DOCS-15628 [BACKPORT] [v6.1] Recipient shard may... Closed
Documented
documents SERVER-68783 Recipient shard may incorrectly retur... Closed
Participants:
Days since reply: 1 year, 8 weeks, 2 days ago
Epic Link: DOCSP-22091
Story Points: 2

 Description   
Original Downstream Change Summary

Previously, a resharding operation would report that its estimated time remaining is 0 if either 1. the operation is very close to finishing or 2. an estimate could not be computed. Now, a value of 0 will only be reported in the former case. The visible effects of this change are as follows:

1. In the $currentOp output for a resharding operation, the remainingOperationTimeEstimatedSecs field may not be present if an estimate could not be computed. Previously, this field would always be present, and have a value of 0 if the estimate could not be computed.

2. In the serverStatus output, the shardingStatistics.resharding.coordinatorAllShardsLowestRemainingOperationTimeEstimatedMillis, shardingStatistics.resharding.coordinatorAllShardsHighestRemainingOperationTimeEstimatedMillis, and shardingStatistics.resharding.recipientRemainingOperationTimeEstimatedMillis fields will report a value of -1 if an estimate could not be computed. Previously, these fields would report a value of 0 in this case.

Description of Linked Ticket

In response to a _shardsvrReshardingOperationTime command (used for querying the estimated remaining time in a resharding operation) from the resharding coordinator, a recipient shard executes this code, which calls ReshardingMetrics::getRecipientHighEstimateRemainingTimeMillis to compute the estimate of the remaining time.  That function may return 0 incorrectly if the shard has just had a failover, and not yet restored all of the metrics.   That can happen because the metrics are only partly restored here and partly restored here.

 

As a result, if a _shardsvrReshardingOperationTime command enters the system at the wrong time, it may observe only partly restored metrics, and the coordinator would be misled into believing that it can begin the critical section.

 

This is related to SERVER-67653, but is not the same because in that ticket the coordinator incorrectly treats an omitted remainingMillis field as 0 remainingMillis.  In this ticket, the recipient incorrectly returns 0 remainingMillis.



 Comments   
Comment by Githook User [ 12/Dec/22 ]

Author:

{'name': 'jmd-mongo', 'email': '73852296+jmd-mongo@users.noreply.github.com', 'username': 'jmd-mongo'}

Message: DOCS-15602 Recipient shard may incorrectly return 0 milliseconds remaining in resharding (#2228)
Branch: indexes-refactor
https://github.com/10gen/docs-mongodb-internal/commit/ecb4d802ff9a89514113cba73bd4996480e17829

Comment by Githook User [ 12/Dec/22 ]

Author:

{'name': 'jmd-mongo', 'email': '73852296+jmd-mongo@users.noreply.github.com', 'username': 'jmd-mongo'}

Message: DOCS-15602 Recipient shard may incorrectly return 0 milliseconds remaining in resharding (#2228)
Branch: master
https://github.com/10gen/docs-mongodb-internal/commit/ecb4d802ff9a89514113cba73bd4996480e17829

Comment by Education Bot [ 13/Sep/22 ]

Fix Version updated for upstream SERVER-68783:
6.2.0-rc0, 6.1.0-rc2

Comment by Education Bot [ 01/Sep/22 ]

Fix Version updated for upstream SERVER-68783:
6.2.0-rc0

Generated at Thu Feb 08 08:13:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.