-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
Fully Compatible
-
Repl 2023-09-04
Right now BulkWriteReplyItem uses the write_ops::Upserted type to expose information about upserts.
However, the Upserted type stores both an index as well as an _id. This makes sense in the context of the update command, since the Upserted type there is a top-level field on the command response and users need a way to map the upsert info back to the input operations.
But in bulkWrite, we are returning this info in the per-statement responses, so it is redundant to include the index. We should just expose the upsertedId instead.