[SERVER-50790] Add a way to ensure a tenant migration fails during testing Created: 08/Sep/20  Updated: 08/Dec/20  Resolved: 05/Dec/20

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

Type: Task Priority: Major - P3
Reporter: Judah Schvimer Assignee: Xuerui Fa
Resolution: Duplicate Votes: 0
Labels: pm-1791_milestone-A
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-48811 Run cloners in MigrationServiceInstance Closed
Sprint: Repl 2020-10-19, Repl 2020-11-02, Repl 2020-11-16, Repl 2020-11-30, Repl 2020-12-14
Participants:

 Description   

This would both be helpful for our own testing, and for Cloud's testing.



 Comments   
Comment by Xuerui Fa [ 08/Dec/20 ]

As of SERVER-48811, we have added failpoints to the recipient side of tenant migrations. These failpoints will let you hang or stop the migration at various points in the recipient migration process. For instance, the "fpAfterPersistingTenantMigrationRecipientInstanceStateDoc" failpoint will let you hang or stop after the recipient has initialized the state doc. The full list of failpoints can be found here

When you're using a failpoint that calls into _stopOrHangOnFailPoint(), you'll need to specify either { "action": "hang" } or {"action": "stop"} in the data object associated with the failpoint. In addition, if you're trying to stop the migration, you'll need to add a "stopErrorCode" field to the data object. This is the error code that will be returned by the recipient when the migration stops. Here is an example of how we use a failpoint to stop the recipient migration in our JS tests.

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

judah.schvimer the donor side already has failpoints to make the migration hang while blocking and make an abort decision while blocking.

It probably makes sense to have a failpoint that makes the migration fail during some part of cloning, so having the repl team add this failpoint on the recipient side makes sense to me.

Comment by Judah Schvimer [ 08/Sep/20 ]

esha.maharishi, if it makes more sense to have this on the recipient side instead of, or in addition to, on the donor side, the repl team can do it/part of it.

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