-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 6.0.0, 7.0.0, 8.0.0-rc0, 7.3.0, 8.1.0-rc0
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
ALL
-
v8.0, v7.3, v7.0
-
CAR Team 2024-07-22
-
0
From the donor side of a chunk migration, before starting the core steps of the migration (clone, catch up, commit...), MigrationSourceManager needs to check or wait until several preconditions are met. However:
- Those precondition checks are done from the constructor. This is fragile since MigrationSourceManager contains a SharedPromise field and an exception from the constructor will not properly fulfill it (which should be done by SharedPromise's contract).
- MigrationSourceManager's constructor will also expose the class's instance through the CollectionSharingRuntime in a way that makes it accessible by other concurrently running operations. If those concurrent operations attempt to abort the migration, they will get a reference to the broken promise's future and fail themselves.
To implement a minimal fix for this problem, we should make sure that if an exception is thrown from MigrationSourceManager's constructor, it will fulfill the completion promise, so other threads trying to abort the migration will be able to wait on the promise successfully, instead of getting a BrokenPromise error propagated and also failing themselves.
- related to
-
SERVER-91970 Wait for overlapping range deletion tasks to be cleared up on the donor side before starting a migration
- Closed
-
SERVER-92531 MigrationSourceManager should use existing clean up infrastructure when aborting in early stages
- Backlog