[CDRIVER-4539] /BulkOperation/multiple_errors fails with missing document in errorReplies Created: 14/Dec/22  Updated: 28/Oct/23  Resolved: 22/Dec/22

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.24.0

Type: Task Priority: Unknown
Reporter: Ezra Chung Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: failing-on-waterfall, flaky-tests
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-4425 Provide access to raw result document... Closed

 Description   

Observed to fail in this patch, followed by success in a following patch.

The errorReplies array is expected to have two documents with "code": 8, one for each command that triggers a failPoint, but only one error reply is observed in the result.

Expected:

{
    "nInserted": 2,
    "nMatched": 0,
    "nModified": 0,
    "nRemoved": 1,
    "nUpserted": 0,
    "errorReplies": [{ "code": 8 }, { "code": 8 }],
    "writeErrors": [{ "index": 5 }]
}

Actual (unrelated fields omitted for brevity):

{
    "nInserted": { "$numberInt": "2" },
    "nMatched": { "$numberInt": "0" },
    "nModified": { "$numberInt": "0" },
    "nRemoved": { "$numberInt": "1" },
    "nUpserted": { "$numberInt": "0" },
    "writeErrors": [
        {
            "index": { "$numberInt": "5" },
            "code": { "$numberInt": "11000" },
            "errmsg": "E11000 duplicate key error collection: test.test_bulk_write_multiple_errors_1654274678_23677 index: _id_ dup key: { _id: 5 }",
            "keyPattern": { "_id": { "$numberInt": "1" } },
            "keyValue": { "_id": { "$numberInt": "5" } }
        }
    ],
    "errorReplies": [
        {
            "ok": { "$numberDouble": "0.0" },
            "errmsg": "Failing command via 'failCommand' failpoint",
            "code": { "$numberInt": "8" },
            "codeName": "UnknownError",
        }
    ]
}

 



 Comments   
Comment by Githook User [ 28/Mar/23 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-4539 fix test assert (#1223)
Branch: r1.23
https://github.com/mongodb/mongo-c-driver/commit/f016e418ab3d6521415d89dacb4ea4f02900e4b6

Comment by Githook User [ 28/Mar/23 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-4539 fix test assert (#1223)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2979cca25af2dc88ef48d339a062afd77cc85fa7

Comment by Githook User [ 22/Dec/22 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-4539 wait for unacknowledged writes to apply in `test_bulk_reply_w0` (#1170)

  • remove incorrect comment
  • wait for unacknowledge writes to apply in test_bulk_reply_w0
Comment by Kevin Albertson [ 20/Dec/22 ]

Also observed here:
https://spruce.mongodb.com/task/mongo_c_driver_gcc82rhel_test_latest_replica_set_noauth_nosasl_nossl_d1134294420514f4308507ff5b2a5f4764d93c73_22_12_16_16_39_44/

Generated at Wed Feb 07 21:21:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.