[SERVER-50215] _configsvrCommitChunkMigration might return before changes are majority committed Created: 10/Aug/20  Updated: 29/Oct/23  Resolved: 20/Aug/20

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

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-1, sharding-csrs-stepdown-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-49147 Make _configsvrCommitChunkMigration i... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:
  1. Start a migration
  2. Step down the primary of the config server after successfully committing the migration but before ending the _configsvrCommitChunkMigration command
  3. Check that both the donor and the recipient shard have the data locally.
Sprint: Sharding 2020-08-10, Sharding 2020-08-24
Participants:
Linked BF Score: 40

 Description   

SERVER-49147 transformed the _configsvrCommitChunkMigration to make it idempotent so a retry would not generate errors, however, it added the possibility to return with two (1 2) reads with local read concern on a command that has a majority written write concern. The result of this is that if a successful commit returns an error (like for example, if the config server steps down right after successfully written the changes) and the command is retried, it will return before the commit is replicated, which might cause a race between the subsequent refresh and the replication. This might cause an invalid state in which the shard does not see it's own change, and will prevent the range deletion task to execute, leaving garbage data on the shard, and serving data which no longer owns.



 Comments   
Comment by Githook User [ 20/Aug/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-50215 _configsvrCommitChunkMigration might return before changes are majority committed
Branch: master
https://github.com/mongodb/mongo/commit/c9438d647183f6e942acb695765e42e7bb7b1afe

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