[SERVER-35518] Support the failCommand fail point in mongoS Created: 09/Jun/18  Updated: 29/Oct/23  Resolved: 02/Nov/18

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

Type: Improvement Priority: Major - P3
Reporter: Shane Harvey Assignee: Natalie Tsvetkova
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-522 Support mongos pinning for sharded tr... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-10-22, Sharding 2018-11-05, Sharding 2018-11-19
Participants:

 Description   

Drivers would like mongoS to support failCommand so that we can run the retryable writes spec tests against a sharded cluster. Currently we only run these tests against a replica set so drivers are left to test sharded clusters by writing extra tests.



 Comments   
Comment by Githook User [ 02/Nov/18 ]

Author:

{'name': 'natalie.tsvetkova', 'email': 'natalie.tsvetkova@mongodb.com', 'username': 'ntsvetko'}

Message: SERVER-35518: Support the failCommand fail point in mongoS
Branch: master
https://github.com/mongodb/mongo/commit/b2f8859fbb0fd0aaaf96dcd1451df3b9844c2eb1

Comment by Shane Harvey [ 12/Jun/18 ]

MongoS does not seem to recognize the fail point:

MongoDB shell version v4.0.0-rc4
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 4.0.0-rc4
Server has startup warnings:
2018-06-12T10:33:30.417-0700 I CONTROL  [main]
2018-06-12T10:33:30.418-0700 I CONTROL  [main] ** WARNING: Access control is not enabled for the database.
2018-06-12T10:33:30.418-0700 I CONTROL  [main] **          Read and write access to data and configuration is unrestricted.
2018-06-12T10:33:30.418-0700 I CONTROL  [main]
MongoDB Enterprise mongos> db.adminCommand({getParameter: 1, enableTestCommands:1}).enableTestCommands
true
MongoDB Enterprise mongos> db.adminCommand({"configureFailPoint":  "failCommand", mode: {times:1}, data:{failCommands: ["insert", "delete"], errorCode:11601}})
{
	"ok" : 0,
	"errmsg" : "failCommand not found",
	"operationTime" : Timestamp(1528825170, 1),
	"$clusterTime" : {
		"clusterTime" : Timestamp(1528825170, 1),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	}
}

Comment by Spencer Brody (Inactive) [ 11/Jun/18 ]

shane.harvey, do you have reason to believe that it doesn't work currently? The failpoint lives in service_entry_point_common.cpp, which is supposed to be shared by mongod and mongos.

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