[SERVER-31306] $clusterTime not included in response with ReadConcernMajorityNotEnabled error Created: 28/Sep/17  Updated: 30/Oct/23  Resolved: 24/Oct/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.6.0-rc2

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Misha Tyulenev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-31887 clusterTime advanced on primary witho... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-10-23, Sharding 2017-11-13
Participants:
Case:

 Description   

The causal consistency design document states that $clusterTime is included in all responses, even ones reporting an error, as in:

replset:SECONDARY> db.runCommand({find : "test", readConcern : {level : "local"}  })
{
	"operationTime" : Timestamp(1506613470, 1),
	"ok" : 0,
	"errmsg" : "not master and slaveOk=false",
	"code" : 13435,
	"codeName" : "NotMasterNoSlaveOk",
	"$clusterTime" : {
		"clusterTime" : Timestamp(1506613470, 1),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	}
}

At least one error condition violates the rule:

replset:SECONDARY> db.runCommand({find : "test", readConcern : {level : "majority"}, $readPreference : {mode : "secondary"}  })
{
	"ok" : 0,
	"errmsg" : "Majority read concern requested, but server was not started with --enableMajorityReadConcern.",
	"code" : 148,
	"codeName" : "ReadConcernMajorityNotEnabled"
}

The expected behavior is that the response contains a $clusterTime.



 Comments   
Comment by Githook User [ 24/Oct/17 ]

Author:

{'email': 'misha@mongodb.com', 'name': 'Misha Tyulenev', 'username': 'mikety'}

Message: SERVER-31306 include clusterTime and operationTime in all errors
Branch: master
https://github.com/mongodb/mongo/commit/86bcd6b0244c188386e6495fbea6ab0dbca01714

Comment by Andy Schwerin [ 28/Sep/17 ]

I think the ability to disable majority read concern support is being removed before rc0, so let's confirm that before making any plans on this ticket.

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