[SERVER-48940] [recovery] Make replication rollback clear and recover a tenant migration donor's in-memory state Created: 18/Jun/20  Updated: 29/Oct/23  Resolved: 28/Sep/20

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

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

Issue Links:
Duplicate
is duplicated by SERVER-49179 Make replication rollback of the "com... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-10-05
Participants:

 Description   

This ticket is to make mongod clear and recover, on replication rollback, which database prefixes to block/reject requests for.

  • Add a function TenantMigrationAccessBlockerByPrefix::removeAll similar to TenantMigrationAccessBlockerByPrefix::remove, but that clears its entire map
  • Make replication rollback call TenantMigrationAccessBlockerByPrefix::removeAll followed by the recoverTenantMigrationAccessBlockers function added under SERVER-48941 just before where prepared transactions are recovered at the end of rollback

Similarly to the previous two tickets, this ticket should test that the code works by causing a rollback on a donor node

  • while the migration is in the "blocking" state
  • after the migration has written the "commit" oplog entry but before the commit oplog entry has majority-committed
  • after the migration has written the "abort" oplog entry but before the abort oplog entry has majority-committed

and confirming that the in-memory state was recovered correctly.



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

Author:

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

Message: SERVER-48940 Make replication rollback clear and recover a tenant migration donor's in-memory state
Branch: master
https://github.com/mongodb/mongo/commit/1075a48476d8bff9e57a39b40d599e62f8c427f9

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

cheahuychou.mao, the RollbackTest helper might be useful in writing the test: https://github.com/mongodb/mongo/blob/418c61279986a5eaddc66a16b5e288556ad1f6d3/jstests/replsets/libs/rollback_test.js

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