[SERVER-49178] [stepdown] Make "commit" and "abort" writes' onAbort handlers call TenantMigrationAccessBlocker::rollBackCommitOrAbort Created: 29/Jun/20  Updated: 09/Oct/20  Resolved: 09/Oct/20

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

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Cheahuychou Mao
Resolution: Duplicate Votes: 0
Labels: pm-1791_milestone-A
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-49177 [stepdown] Make "start blocking" writ... Closed
Sprint: Sharding 2020-10-05, Sharding 2020-10-19
Participants:

 Description   
  • Add a TenantMigrationDonorHandler class that inherits from RecoveryUnit::Change (see example) in op_observer_impl.cpp with private members _databasePrefix and _state.
    • commit() can just be empty
    • rollback() should do the following (similar to SERVER-49179):
      • If _state is “abort” or “commit”, get TenantMigrationAccessBlocker for that “databasePrefix” from the TenantMigrationAccessBlockerByPrefix decoration, and and call rollBackCommitOrAbort on it.
  • Register TenantMigrationDonorHandler to the change to config.migrationDonors  onUpdate in op_observer_impl.cpp if the namespace matches  (see example).


 Comments   
Comment by Esha Maharishi (Inactive) [ 22/Sep/20 ]

The ticket description is a little outdated after SERVER-50938.

An alternative is to call mtab->commit and mtab-> abort in a commit() handler, so that we don't have to worry about the commit/abort write aborting.

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