-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Fully Compatible
-
ALL
-
v5.0
-
Sharding 2021-06-14
-
33
-
1
The UnblocksWhenCancellationTokenIsCancelled test (defined here) may hang due to the following:
- The main-thread proceeds with running commands for the mocked network interface (here), but is scheduled out after running the first command, which cancels the cancelation token.
- The commit monitor is notified about the cancelation, by checking the cancelation token in here, and returns from the function that queries the shards. As a result, the instance of ARS goes out of scope, and the destructor for ARS cancels any pending network operations.
- The main thread is scheduled again to run commands on behalf of the mocked network interface, but since the pending commands are canceled, it will stay blocked forever.
The simple fix for this data-race is to create a new fail-point that blocks the commit-monitor in here, and unblocks it after canceling the cancelation token. This change obviates the need for the main thread to serve any commands for the mocked network interface.
- has to be done before
-
SERVER-56215 Ensure current client is set in CoordinatorCommitMonitor unit-tests
- Closed