[SERVER-45707] Test that range deletion tasks are eventually deleted even if collection is dropped before migration coordination is resumed Created: 22/Jan/20  Updated: 29/Oct/23  Resolved: 30/Jan/20

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

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-47387 Remove TODO comment for SERVER-45707 Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-02-10
Participants:

 Description   

When a replica set node transitions to primary, it launches an asynchronous task to resume coordinating migrations whose state was checkpointed  in a document in config.migrationCoordinators.

If the outcome of the migration (committed or aborted) had not been checkpointed, the node uses the _configsvrEnsureChunkVersionIsGreaterThan command against the config server to guarantee that the migration's decision will not change after that command executes, then forces a filtering metadata refresh and checks if the min key of the migrating range still belongs to the local shard.

As part of this check, the node checks that the filtering metadata's UUID matches the UUID in the config.migrationCoordinators doc, and if they do not match, cleans up the range deletion tasks on itself and the recipient as well as the migrationCoordinator doc itself.

This ticket is to add a test that that cleanup does occur, by doing something like inducing a failover on the donor shard, adding a failpoint to hang in the task before doing the filtering metadata refresh, dropping the collection from the cluster while the failpoint is active, then unsetting the failpoint and asserting that the range deletion tasks and migrationCoordinator doc are eventually deleted.



 Comments   
Comment by Githook User [ 08/Apr/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-47387 Remove TODO comment for SERVER-45707

(cherry picked from commit d9b93b6a8eb645f40ee14807e97b038ce1a45d3d)
Branch: v4.4
https://github.com/mongodb/mongo/commit/1270d99eae46ff1b81e712cefb83137eb39d90e8

Comment by Githook User [ 08/Apr/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-47387 Remove TODO comment for SERVER-45707
Branch: master
https://github.com/mongodb/mongo/commit/d9b93b6a8eb645f40ee14807e97b038ce1a45d3d

Comment by Githook User [ 30/Jan/20 ]

Author:

{'name': 'Cheahuychou Mao', 'username': 'cheahuychou', 'email': 'cheahuychou.mao@mongodb.com'}

Message: SERVER-45707 Test that range deletion tasks are eventually deleted even if collection is dropped before migration coordination is resumed

create mode 100644 jstests/sharding/delete_range_deletion_tasks_on_stepup_after_drop_collection.js
Branch: master
https://github.com/mongodb/mongo/commit/9cda0c48d4f251f65639417396f06309e562e524

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