[SERVER-85230] Disallow balancer moveCollection commands that would move collections with views outside the dbPrimary Created: 16/Jan/24  Updated: 22/Jan/24

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

Type: Task Priority: Major - P3
Reporter: Allison Easton Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-85522 Add a warning to view creation if the... Backlog
Assigned Teams:
Catalog and Routing
Participants:

 Description   

There is a performance issue that causes collections with views to have substantially decreased performance if the collection lives on a different shard than the view. This isn't currently an issue for unsharded collections because all collections and views live on the dbPrimary.

However, once the balancer starts moving unsharded collections, it could be possible that the balancer chooses to move a collection with a view to a shard other than the dbPrimary. We should not allow this because it would reduce the performance on this view.

Because the balancer is located on the config server and so does not know which collections have views, it will be the responsibility of the shard donating the collection to check before beginning the moveCollection command and throw an error if the collection has a view and the destination shard is not the dbPrimary.


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