[SERVER-65208] Check the top-chunk before refreshing the local metadata Created: 04/Apr/22  Updated: 29/Oct/23  Resolved: 04/Apr/22

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

Type: Task Priority: Major - P3
Reporter: Antonio Fuschetto Assignee: Antonio Fuschetto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-64464 Check the shard version for collectio... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-04-04, Sharding EMEA 2022-04-18
Participants:
Linked BF Score: 45

 Description   

The identification of the range containing the top-chunk is performed by the shard after committing the split to the config server and after refreshing the local metadata. That logic needs to access the collection data, so it instantiates an AutoGetCollection to lock on the collection. As the local shard version might be updated as a consequence of the metadata refresh, it could no longer match with the shard version sent by the router. In this case, AutoGetCollection would throw a stale config error causing the splitChunk command to fail.

A simple solution to resolve the problem is to anticipate the identification of the range containing the top-chunk before refreshing the local metadata.



 Comments   
Comment by Githook User [ 04/Apr/22 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-65208 Check the top-chunk before refreshing the local metadata
Branch: master
https://github.com/mongodb/mongo/commit/93b609f94dd58452ba28f277a6739b7740b9980a

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