[SERVER-49173] Add function for the donor's "data sync" state and make donorStartMigration call the function Created: 29/Jun/20  Updated: 29/Oct/23  Resolved: 22/Jul/20

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

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Luis Osta (Inactive)
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-07-27
Participants:

 Description   

This ticket is to:

  • Add a file migrating_tenant_donor_util.{h, cpp} to the serveronly_repl library
  • Add a function getTenantMigrationExecutor() to the file that returns a ThreadPoolTaskExecutor (see example). (This method of generating an executor is temporary and will be changed once we move the donor functions onto a Primary-Only Service.)
  • In the new file, add a free function "dataSync" that takes an OperationContext* and the donor's IDL type as an argument and does the following:
    • Send recipientSyncData to the recipient until success (it's ok if this is implemented as a TODO comment for now and a separate ticket is filed for it)
    • Create a MigratingTenantAccessBlocker (passing in an executor made using getTenantMigrationExecutor()) and call startBlockingWrites on it, then add() it to MigratingTenantAccessBlockerByPrefix with the database prefix
  • Call the free function from the donorStartMigration command.

Add an integration test that calls donorStartMigration and uses serverStatus to check that the MigratingTenantAccessBlocker got added to the MigratingTenantAccessBlockerByPrefix and is in the "blockWrites" state.

 



 Comments   
Comment by Githook User [ 22/Jul/20 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-49173 Add function for the donor's "data sync" state and make donorStartMigration call the function
Branch: master
https://github.com/mongodb/mongo/commit/8463aca9b749a3374c053ed27d9abebd2fa54276

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