[SERVER-59793] Omit tenantId from serverStatus and currentOp metrics during Merge Created: 03/Sep/21  Updated: 29/Oct/23  Resolved: 23/Nov/21

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

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

Issue Links:
Backports
Depends
Related
related to SERVER-59790 Block access to migrating data on don... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.1
Sprint: Server Serverless 2021-10-25, Server Serverless 2021-11-01, Server Serverless 2021-11-15, Server Serverless 2021-11-29
Participants:

 Description   

If a migration's protocol is "shard merge" then the donor donates all data to the recipient, not just one tenant's data. Thus there's no tenantId. Omit it from the replies of the diagnostic commands serverStatus and currentOp for migrations with protocol "shard merge".

(Until the Shard Merge project is complete, "shard merge" migrations still use tenantId. We're gradually implementing shard merge to the point where it doesn't need a tenantId. But we can remove tenantId from serverStatus and currentOp now.)

The code is in reportForCurrentOp() in tenant_migration_donor/recipient_service.h/cpp, and appendInfoForServerStatus() in tenant_migration_access_blocker_registry.cpp and tenant_migration_donor/recipient_access_blocker.cpp.

Search for "tenantMigrationAccessBlocker" in the jstests/replsets directory and you'll see that most of the work for this ticket may be updating tests. We use the same tests for the old and new migration protocols, so they must expect different currentOp and serverStatus formats depending on the protocol. Let's make a nicely-factored utility for the JS tests to abstract that difference away.



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

Author:

{'name': 'Christopher Caplinger', 'email': 'christopher.caplinger@mongodb.com', 'username': 'UnicodeSnowman'}

Message: SERVER-59793: Omit tenantId from metrics for Merge
Branch: master
https://github.com/mongodb/mongo/commit/ebef2399f1672f50d4990697ee1338c39aa32ed6

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