Summary
Allow updateOne (i.e. update with multi:false), deleteOne (i.e delete with limit:1), and findAndModify without a shard key or _id equality in their filter to work against a sharded collection, supporting all options.
Motivation
The current implementation of updateOne, deleteOne, and findAndModify against a sharded collection requires that the request can be unequivocally routed to a single shard (i.e. the shard key must be in the filter) or, for updateOne and deleteOne, that the document to be modified can be uniquely identified through its _id. If these requirements are not satisfied, these writes fail, which makes the presence of sharding underneath more apparent and prevents automatically sharding a user’s collection, which is at odds with the long term vision for serverless MongoDB.
Documentation
Scope Document
Technical Design Document