SERVER-113344ClosedFixed

bulkWrite returns success items despite errorsOnly:true on write without shard key

When issuing a *bulkWrite* with *errorsOnly:true* and the operation goes through the two-phase write ([write_ops/write_without_shard_key_util.cpp|https://github.com/10gen/mongo/blob/dceb2114550d5c3c50ae77bac76c8828ecb2908e/src/mongo/s/write_ops/write_without_shard_key_util.cpp#L152]) without shard key path (because the filter doesn’t contain the shard key and the write requires an upsert), the server returns a cursor containing per-item success reply items. This violates the contract of {*}error

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
8.3.0-rc08.0.37
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.