[SERVER-75200] multi-batch update with {upsert: true} at index: 1 reports incorrect index in response Created: 23/Mar/23  Updated: 24/Mar/23  Resolved: 24/Mar/23

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

Type: Task Priority: Major - P3
Reporter: Sanika Phanse (Inactive) Assignee: [DO NOT USE] Backlog - Sharding NYC
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding NYC
Participants:

 Description   

 cmdObj: {
            update: collName,
            updates: [
                {q: {y: yFieldVal}, u: {y: yFieldVal + 1}},
                {q: {y: 6}, u: {x: -1, _id: 6}, upsert: true}
            ],
        }

index is correctly set to 1 here, but rewritten here. Looks like targetedBatch.size == 1, and thus it is reading an out of bounds value at targetedBatch[1] (I confirmed childBatchIndex == 1). Moreover, I saw that targetBatch[0] = 1.


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