[SERVER-51347] Allow writes on a collection string-matching ".system.resharding." for Resharding Created: 05/Oct/20  Updated: 29/Oct/23  Resolved: 08/Oct/20

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

Type: Task Priority: Major - P3
Reporter: Blake Oler Assignee: Alexander Taskov (Inactive)
Resolution: Fixed Votes: 0
Labels: PM-234-M1, PM-234-T-lifecycle
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-51209 Fill in missing gaps in Resharding wo... Closed
is depended on by SERVER-51210 Call setInitialChunksAndZones from th... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-10-19
Participants:

 Description   

As of now, inserts are disallowed on a collection with ".system" in the collection name. A current exception is config.cache.chunks.config.system.sessions, since that collection must be writable as part of the replicated chunk metadata collection. We must also allow the resharding temporary collection's chunk metadata collection to be modified. The temporary resharding collection follows this pattern:

For a db <db> and a collection with UUID <uuid>,

<db>.system.resharding.<uuid>

and the chunk metadata collection would be:

config.cache.chunks.<db>.system.resharding.<uuid>

So to capture both collections and to avoid being more permissive than the current collection name restrictions with regards to other collections matching ".system.", we should follow roughly this code:

if (ns.coll().find(".system.resharding.") != std::string::npos) {
    return Status::OK();
}



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

Author:

{'name': 'Alex Taskov', 'email': 'alex.taskov@mongodb.com', 'username': 'alextaskov'}

Message: SERVER-51347 Allow writes on a collection string-matching '.system.resharding.' for Resharding
Branch: master
https://github.com/mongodb/mongo/commit/1f11a9c73e11ebb6a89b1600a0a03741111c48bc

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