[SERVER-41125] Attach UnknownTransactionCommitResult errorLabel when commitTransaction fails and the result is unknown Created: 13/May/19  Updated: 06/Dec/22  Resolved: 13/Dec/19

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

Type: Task Priority: Major - P3
Reporter: Shane Harvey Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-37746 Shell doesn't correctly implement the... Closed
Assigned Teams:
Replication
Participants:

 Description   

Similar to SERVER-34256 (where the server started adding to TransientTransactionError error label to transient errors within a transaction) the server should attach the UnknownTransactionCommitResult error label when commitTransaction fails and the result of the transaction is unknown.

When UnknownTransactionCommitResult is returned it is expected that a client can re-run commitTransaction.

A non-exhaustive list of errors that should be labelled UnknownTransactionCommitResult are:

// Retryable writes errors:
{ok: 0, code: 11600, codeName: "InterruptedAtShutdown"}
{ok: 0, code: 11602, codeName: "InterruptedDueToStepDown"}
{ok: 0, code: 10107, codeName: "NotMaster"}
{ok: 0, code: 13435, codeName: "NotMasterNoSlaveOk"}
{ok: 0, code: 13436, codeName: "NotMasterOrSecondary"}
{ok: 0, code: 189, codeName: "PrimarySteppedDown"}
{ok: 0, code: 91, codeName: "ShutdownInProgress"}
{ok: 0, code: 7, codeName: "HostNotFound"}
{ok: 0, code: 6, codeName: "HostUnreachable"}
{ok: 0, code: 89, codeName: "NetworkTimeout"}
{ok: 0, code: 9001, codeName: "SocketException"}
 
// maxTimeMS on commit error:
{ok: 0, code: 50, codeName: "MaxTimeMSExpired"}
 
// Any write concern error except UnsatisfiableWriteConcern and UnknownReplWriteConcern, eg:
{ok:1, writeConcernError: {code: 64, codeName: "WriteConcernFailed", errmsg: "waiting for replication timed out", errInfo: {wtimeout: True}}}
{ok:1, writeConcernError: {code: 64, codeName: "WriteConcernFailed", errmsg: "multiple errors reported : {...} at shardName1 :: and :: {...} at shardName2"}}
{ok:1, writeConcernError: {code: 11600, codeName: "InterruptedAtShutdown"}}
{ok:1, writeConcernError: {code: 11601, codeName: "Interrupted"}}
{ok:1, writeConcernError: {code: 11602, codeName: "InterruptedDueToStepDown"}}
{ok:1, writeConcernError: {code: 91, codeName: "ShutdownInProgress"}}
{ok:1, writeConcernError: {code: 189, codeName: "PrimarySteppedDown"}}
{ok:1, writeConcernError: {code: 50, codeName: "MaxTimeMSExpired"}}


Generated at Thu Feb 08 04:56:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.