-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.2.12
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
v4.0
-
-
(copied to CRM)
-
85
Batch write operations could either return a top level error:
{ok: 0, code: 91, messaage: "Server is shutting down"}
or a nested array of writeErrors:
{ok: 1, writeErrors: [ { index: 0, code: 91, message: "Server is shutting down" } ]}
Since our current retryable-write specs is a bit vague around the handling of the batchWrite response in case of writeErrors, drivers only implement retries for top-level errors of a batch write response and won't even look at the retry-able errors in the writeErrors array.
The problem is that if a mongos gets shutted down in the middle of a batch write execution instead of returning a response with a top level error it could actually return a nested array that won't be retried by drivers.
So in this case we will have a batch write that fail with a retryable error that won't be retried neither from the mongos nor from the driver.
I suspect that this is the same underlying issue of SERVER-53624 but that one is specific to mongoDB versions grater than 4.4, given that mongos is attaching retryable error labels only since v4.4.
- is related to
-
SERVER-53624 4.4 mongos does not attach RetryableWriteError label to shutdown errors
- Closed
- related to
-
SERVER-59474 Return a shutdown error as top-level error for batch write command that fails with CallbackCanceled when mongos shuts down
- Closed
-
SERVER-62175 Mongos fails to attach RetryableWrite Error Label For Command Interrupted In _parseCommand
- Closed
-
SERVER-64642 Fix error where mongos returns CallbackCanceled and not InterruptedAtShutdown on shutdown
- Closed
-
SERVER-58985 Re-enable retryable_mongos_write_errors.js in multiversion suite once SERVER-55648 is backported to v4.0
- Closed