[SERVER-50440] Make TenantMigrationAccessBlockerByPrefix include '_' when doing lookup Created: 21/Aug/20  Updated: 29/Oct/23  Resolved: 08/Sep/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Task Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Jason Zhang
Resolution: Fixed Votes: 0
Labels: pm-1791_milestone-A
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-09-21
Participants:

 Description   

Each database stored on Altas shared tier is assigned a database name of the form [tenantId]_[originalDatabaseName]. To make sure that the database prefix for a tenant migration always corresponds to a tenant id, we should include "_" in this check in TenantMigrationAccessBlockerByPrefix::getTenantMigrationAccessBlocker (i.e.  change it to dbName.startsWith(dbPrefix + "_")). 

Each existing jstest for tenant migrations that runs donorStartMigration with 'databasePrefix' equals to the name of the database that it intends to migrate will need to be updated. 



 Comments   
Comment by Githook User [ 08/Sep/20 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com'}

Message: SERVER-50440 Make TenantMigrationAccessBlockerByPrefix include '_' when doing lookup
Branch: master
https://github.com/mongodb/mongo/commit/664c4ab229217f23041f9fdc2f5ecd8f5174c77e

Comment by Jason Zhang [ 03/Sep/20 ]

Code review url:

https://mongodbcr.appspot.com/677860001/

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