The documentation states the following, that can be confusing:
the `_id` index only enforces the uniqueness constraint per shard if the `_id` field is not the shard key or the prefix of the shard key.
I propose to change this paragraph with the following (or similar phrasing):
The `_id` index guarantees uniqueness across all shards only when the shard key is exactly `_id` . In any other case - even when the `_id` field is part of a compound shard key - uniqueness is only guaranteed on a per-shard basis.