[SERVER-72430] MigrationDestinationManager::report() may access null _migrationCloningProgress Created: 29/Dec/22  Updated: 29/Oct/23  Resolved: 06/Jan/23

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.15, 6.3.0-rc0, 6.0.5, 6.0.6

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Andrew Witten (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-67183 Higher throughput Chunk Migration - r... Closed
Assigned Teams:
Sharding NYC
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.0
Participants:
Linked BF Score: 149

 Description   

It is possible for commands like _recvChunkStatus to be called prior to MigrationDestinationManager::start() having been called on that node. For example, there may be a primary failover on the recipient shard where the new primary of the recipient shard has never participated in a chunk migration and the primary of the donor shard runs _recvChunkStatus. The donor shard expects to learn the recipient shard has abandoned the chunk migration through the _recvChunkStatus response.

long long _getNumCloned() {
    return _migrationCloningProgress->getNumCloned();
}
 
long long _getNumBytesCloned() {
    return _migrationCloningProgress->getNumBytes();
}

Returning 0 from MigrationDestinationManager::_getNumCloned() and MigrationDestinationManager::_getNumBytesCloned() will probably suffice.



 Comments   
Comment by Githook User [ 16/Mar/23 ]

Author:

{'name': 'Andrew Witten', 'email': 'andrew.witten@mongodb.com', 'username': 'awitten1'}

Message: SERVER-72430 check for null migration progress ptr

(cherry picked from commit af1ad78010f1396ad09f2f96e16705598f45a54b)
Branch: v6.0
https://github.com/mongodb/mongo/commit/89764639881b07ce5355a2234f136cfb4c2cd3df

Comment by Githook User [ 02/Mar/23 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: Revert "SERVER-72430 check for null migration progress ptr"

This reverts commit 126bac30396cb6b4f2d571e96997eae1e4eb2df2.
Branch: v6.0
https://github.com/mongodb/mongo/commit/b3622ffcaa4efbb8752ca4acb1dbbb93c05d2ff5

Comment by Githook User [ 27/Jan/23 ]

Author:

{'name': 'Andrew Witten', 'email': 'andrew.witten@mongodb.com', 'username': 'awitten1'}

Message: SERVER-72430 check for null migration progress ptr

(cherry picked from commit 126bac30396cb6b4f2d571e96997eae1e4eb2df2)
Branch: v5.0
https://github.com/mongodb/mongo/commit/f1404ad2d2a90ae557287ee6413a33f72315ff54

Comment by Githook User [ 23/Jan/23 ]

Author:

{'name': 'Andrew Witten', 'email': 'andrew.witten@mongodb.com', 'username': 'awitten1'}

Message: SERVER-72430 check for null migration progress ptr

(cherry picked from commit af1ad78010f1396ad09f2f96e16705598f45a54b)
Branch: v6.0
https://github.com/mongodb/mongo/commit/126bac30396cb6b4f2d571e96997eae1e4eb2df2

Comment by Githook User [ 05/Jan/23 ]

Author:

{'name': 'Andrew Witten', 'email': 'andrew.witten@mongodb.com', 'username': 'awitten1'}

Message: SERVER-72430 check for null migration progress ptr
Branch: master
https://github.com/mongodb/mongo/commit/af1ad78010f1396ad09f2f96e16705598f45a54b

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