[SERVER-61299] Crash when donor collection is renamed during tenant migration Created: 05/Nov/21  Updated: 29/Oct/23  Resolved: 11/Nov/21

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

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-61341 Support collection rename in tenant m... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.1
Sprint: Server Serverless 2021-11-15
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-61299 Rename during migration crashes recipient
Branch: master
https://github.com/mongodb/mongo/commit/5c19a427713891054cafa9b7a002d65dd5668189

Comment by A. Jesse Jiryu Davis [ 08/Nov/21 ]

Discovered while investigating SERVER-61308, but this is actually unrelated.

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