[SERVER-50872] Make the OpObserver construct TenantMigrationAccessBlocker on observing insertion for state doc with state "data sync" Created: 10/Sep/20  Updated: 29/Oct/23  Resolved: 11/Sep/20

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

Type: Task Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
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   

Right now on the primary the TenantMigrationAccessBlocker is created inside the constructor for TenantMigrationDonorService::Instance, whereas on secondaries it is created by the OpObserver on observing the transition to blocking state. When a secondary steps up, PrimaryOnlyService::_rebuildInstances can fail with ConflictingOperationInProgress when creating TenantMigrationDonorService for active migrations since the secondary already has the TenantMigrationAccessBlockers for those migrations. To avoid this, we should construct TenantMigrationAccessBlocker on observing insertion for state doc with state "data sync".



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

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-50872 Make the OpObserver construct TenantMigrationAccessBlocker on observing insertion for state doc with state "data sync"
Branch: master
https://github.com/mongodb/mongo/commit/8dfebbb8bcc197c19108daebbc46224b0ad846bf

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