[SERVER-28829] create generic flag on OperationShardingState to prevent accessing sharded namespaces Created: 17/Apr/17 Updated: 27/Oct/23 Resolved: 02/Nov/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.5.6 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | MaxH | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Sharding
|
||||||||
| Participants: | |||||||||
| Description |
|
It can currently be done by setting a shardVersion on some dummy namespace to "UNSHARDED", because OperationShardingState::getShardVersion(const NamespaceString& nss) returns version UNSHARDED if the namespace requested does not match the one set. It would be nice not to rely on this trick, and instead have an explicit way of ensuring an operation is unsharded. |
| Comments |
| Comment by Max Hirschhorn [ 02/Nov/22 ] |
|
Admittedly, I don't fully understand the motivation for this ticket however I do believe the problem has already been solved.
|
| Comment by Esha Maharishi (Inactive) [ 17/Apr/17 ] |
|
The linked ticket is an example of using the "trick." |