[SERVER-75595] Improve logging in tenant migration donor & recipient service. Created: 03/Apr/23  Updated: 29/Oct/23  Resolved: 14/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, 7.1.0-rc3

Type: Task Priority: Major - P3
Reporter: Suganthi Mani Assignee: Suganthi Mani
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.1
Sprint: Server Serverless 2023-04-17, Server Serverless 2023-05-01, Server Serverless 2023-05-15, Server Serverless 2023-09-18
Participants:

 Description   

Ask #1
Technically, donor sends 3 internal commands to recipient

1) recipientSyncData cmd
2) recipientSyncData cmd with returnAfterReachingDonorTimestamp
3) RecipientForgetMigration cmd

If those commands fails for any reason, the donor logs the error message as Tenant migration recipient command failed... with reason for the failure but doesn't log the command name that failed.

Sample log message

"Entering 'aborted' state.","attr":{"migrationId":{"uuid":{"$uuid":"0b5da69e-ce14-4c0e-8e26-32878f04bbcf"}},"tenantId":"","status":{"code":325,"codeName":"TenantMigrationAborted","errmsg":"Tenant migration recipient command failed :: caused by :: Failover happened during migration :: migrationId: 0b5da69e-ce14-4c0e-8e26-32878f04bbcf"}}}

Ask #2
When the oplog fetcher fails, the error message we are printing today is not clear which component in the recipient service threw that error.

{"code":50,"codeName":"MaxTimeMSExpired","errmsg":"Tenant migration recipient command failed :: caused by :: PlanExecutor error during aggregation :: caused by :: operation exceeded time limit"}



 Comments   
Comment by Githook User [ 18/Sep/23 ]

Author:

{'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}

Message: SERVER-75595 Improve logging in tenant migration donor & recipient service.

(cherry picked from commit 6c7b13749a96e3fb6bed8ee1cdbda39efff8cf67)
Branch: v7.1
https://github.com/mongodb/mongo/commit/3ff9bad79c037f6f54174d34e75aa890e671517b

Comment by Githook User [ 14/Sep/23 ]

Author:

{'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}

Message: SERVER-75595 Improve logging in tenant migration donor & recipient service.
Branch: master
https://github.com/mongodb/mongo/commit/6c7b13749a96e3fb6bed8ee1cdbda39efff8cf67

Generated at Thu Feb 08 06:30:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.