[SERVER-38777] createCollection should not return ok: 1 with write concern errors Created: 26/Dec/18  Updated: 06/Dec/22  Resolved: 14/Jan/19

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

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou 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:
Depends
Related
is related to SERVER-38782 Disable transaction kill / terminate ... Closed
is related to SERVER-38936 Create unittests for txn_override.js Closed
is related to SERVER-38937 Unify txn_override.js and auto_retry_... Closed
Assigned Teams:
Replication
Operating System: ALL
Participants:
Linked BF Score: 7

 Description   

The behavior is found in a build failure. It might be surprising to users.

[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.308+0000 assert: command failed: {
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.309+0000 	"writeConcernError" : {
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.309+0000 		"code" : 91,
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.309+0000 		"codeName" : "ShutdownInProgress",
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.319+0000 		"errmsg" : "Replication is being shut down"
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.325+0000 	},
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.326+0000 	"ok" : 1,
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.326+0000 	"$clusterTime" : {
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.326+0000 		"clusterTime" : Timestamp(1542563026, 1),
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.327+0000 		"signature" : {
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.327+0000 			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.332+0000 			"keyId" : NumberLong(0)
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.335+0000 		}
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.335+0000 	},
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.335+0000 	"operationTime" : Timestamp(1542563026, 1)
[multi_stmt_txn_passthrough:inc2] 2018-11-18T17:43:46.340+0000 }



 Comments   
Comment by Judah Schvimer [ 01/Jan/19 ]

Historically WriteConcernErrors have accompanied an ok: 1 because there is no real way to know if they succeeded or not and blindly retrying them isn't necessarily safe. For commands maybe this is different than for CRUD ops, but I think we need to think about this more as an explicit decision to change behavior than as a bug.

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