-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Server Serverless 2023-04-03
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
In this ticket we aim to improve the acquire/release semantics of the serverless locks and the tenant access blockers. There are two main issues to address :
- The rollback handler for MTAB and serverless lock is only registered on primaries. This is a bug as there might be a write conflict exception on secondaries that would cause them to retry the write (and reacquire mtab/serverless lock).
- The rollback handler is registered some time after acquiring the serverless lock (https://github.com/10gen/mongo/blob/347fcaa2fc3b26441f622cddae8ea06553cb7786/src/mongo/db/repl/tenant_migration_donor_op_observer.cpp#L70). If there is an error thrown inbetween, we might retry the operation without releasing the lock.
The fixes :
- Remove `if (onPrimary)` conditions.
- Move `rollback` handler as close to acquire serverless lock and mtab (and decouple the handlers).
- Review all places we use `acquireLock` to ensure correct behavior.
- is duplicated by
-
SERVER-75069 Reapplying an insert donor state doc op (for split, merge and tenant migration) on secondaries due to WCE can cause node crash .
-
- Closed
-
- is related to
-
SERVER-72370 Update in-memory serverless locks transactionally for tenant migration recipient
-
- Closed
-
- related to
-
SERVER-75069 Reapplying an insert donor state doc op (for split, merge and tenant migration) on secondaries due to WCE can cause node crash .
-
- Closed
-