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

Crash when donor collection is renamed during tenant migration

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • v5.1
    • Server Serverless 2021-11-15
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      If a donor collection is renamed during a migration, the recipient crashes, logging like:

      {"t":{"$date":"2021-11-05T21:35:57.006+00:00"},"s":"E",  "c":"TENANT_M", "id":4881601, "ctx":"TenantMigrationRecipientService-3","msg":"Tenant collection clone failed","attr":{"namespace":"testTenantId1_testDB.testCappedColl","error":"DuplicateKey{ keyPattern: { _id: 1 }, keyValue: { _id: ObjectId('6185a38ce1e0eec06ba161ee') } }: Tenant collection cloner: insert documents :: cause
      d by :: E11000 duplicate key error collection: testTenantId1_testDB.testCappedColl index: _id_ dup key: { _id: ObjectId('6185a38ce1e0eec06ba161ee') }","tenantId":"testTenantId1"}}
      {"t":{"$date":"2021-11-05T21:35:57.006+00:00"},"s":"F",  "c":"CONTROL",  "id":40680,   "ctx":"TenantMigrationRecipientService-3","msg":"Code \{code} is supposed to have extra info","attr":{"code":11000}}
      {"t":{"$date":"2021-11-05T21:35:57.006+00:00"},"s":"F",  "c":"ASSERT",   "id":23089,   "ctx":"TenantMigrationRecipientService-3","msg":"Fatal assertion","attr":{"msgid":40680,"file":"src/mongo/base/status.cpp","line":82}}
      

      I'm not sure why renaming the collection causes DuplicateKeyError on the recipient. We can make a followup ticket to investigate if no one knows.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: