Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-51774

[testing] Ensure the donor's TenantMigrationCommitted/TenantMigrationAborted write errors don't exceed the max BSON size

    • Fully Compatible
    • Sharding 2020-12-14, Sharding 2020-12-28, Sharding 2021-01-11, Sharding 2021-01-25, Sharding 2021-02-22, Sharding 2021-03-08

      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.

            Assignee:
            jason.zhang@mongodb.com Jason Zhang
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: