[SERVER-51774] [testing] Ensure the donor's TenantMigrationCommitted/TenantMigrationAborted write errors don't exceed the max BSON size Created: 20/Oct/20  Updated: 29/Oct/23  Resolved: 02/Mar/21

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

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Jason Zhang
Resolution: Fixed Votes: 0
Labels: pm-1791_milestone-A, pm-1791_non-cloud-blocking
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-12-14, Sharding 2020-12-28, Sharding 2021-01-11, Sharding 2021-01-25, Sharding 2021-02-22, Sharding 2021-03-08
Participants:

 Description   

After SERVER-51423, the donor will return write errors of the form:

writeErrors: [
    {
        index: 5,
        code: 321,
        errmsg: "Write must be re-routed to the new owner of this tenant",
        errInfo: {
            tenantId: <stringified ObjectId>,
            recipientConnectionString: "recipient/ip-10-122-14-247:20021"
        }
    },
    {
        index: 6,
        code: 321,
        errmsg: "Write must be re-routed to the new owner of this tenant",
        errInfo: {
            tenantId: <stringified ObjectId>,
            recipientConnectionString: "recipient/ip-10-122-14-247:20021"
        }
    }
]

 
This ticket is to confirm that these write errors are not too large.

DocumentValidationFailureInfo has a max error size which is 12 * 1024 * 1024 (bytes, I'm assuming).

From a quick test using https://lingojam.com/ByteCounter, the following large replica set connection string:

recipient-replica-set-with-humongous-set-name-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345,host:12345

is only 850 bytes.



 Comments   
Comment by Githook User [ 02/Mar/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-51774 Ensure the donor's
TenantMigrationCommitted/TenantMigrationAborted write errors don't
exceed the max BSON size
Branch: master
https://github.com/mongodb/mongo/commit/8c248bf16a781bd096f1829ab61bed9f5655ad41

Generated at Thu Feb 08 05:26:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.