[SERVER-49174] Make writes call MigratingTenantAccessBlocker::checkIfCanWriteOrThrow in op observer Created: 29/Jun/20  Updated: 29/Oct/23  Resolved: 28/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: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: pm-1791_milestone-A
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-49834 Handle fsync and fsyncUnlock during t... Closed
related to SERVER-49835 Handle user management and role manag... Closed
related to SERVER-49844 Handle commitTransaction and abortTra... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-07-27, Sharding 2020-08-10
Participants:

 Description   

In the op observer after being assigned an OpTime (e.g., where this happens for inserts), writes should get the MigratingTenantAccessBlocker for the database they're in from the MigratingTenantAccessBlockerByPrefix and call checkIfCanWriteOrThrow on it.

Note that this should be done in all op observers for user writes, e.g. includes things like collMod, createIndex, and drop.

Test that this works by calling donorStartMigration to put the database's MigratingTenantAccessBlocker into blockWrites and confirming that all writes throw TenantMigrationConflict. (After the migrationConflictRetry loop is added in SERVER-49181, this test will have to be modified to, e.g., send the writes with maxTimeMS and assert that they throw MaxTimeMSExpired.)



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

Author:

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

Message: SERVER-49174 Make writes call MigratingTenantAccessBlocker::checkIfCanWriteOrThrow in op observer
Branch: master
https://github.com/mongodb/mongo/commit/81b362abbfbb71f1da25c1aaad8b02df6d1e5869

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