[DOCS-7552] Description of Read Concern should include special behavior Created: 31/Mar/16  Updated: 11/Jan/17  Resolved: 11/Apr/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: William Cross Assignee: Kyle Suarez
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-6785 Document readConcern special cases Closed
Participants:
Days since reply: 7 years, 44 weeks, 2 days ago

 Description   

The Read Concern Documention mentions both count and aggregate, but does not include special cases for count() and aggregate().

It also doesn't mention that read concern, as currently implemented, can prevent reads from non-replicated collections, such as system.profile:

MongoDB Enterprise cross:PRIMARY> rs.status()
{
	"set" : "cross",
	"date" : ISODate("2016-03-31T19:44:40.784Z"),
	"myState" : 1,
	"term" : NumberLong(1),
	"heartbeatIntervalMillis" : NumberLong(2000),
	"members" : [
		{
			"_id" : 0,
			"name" : "localhost:27017",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 4354,
			"optime" : {
				"ts" : Timestamp(1459450599, 1),
				"t" : NumberLong(1)
			},
			"optimeDate" : ISODate("2016-03-31T18:56:39Z"),
			"electionTime" : Timestamp(1459449128, 2),
			"electionDate" : ISODate("2016-03-31T18:32:08Z"),
			"configVersion" : 3,
			"self" : true
		},
		{
			"_id" : 1,
			"name" : "localhost:27018",
			"health" : 1,
			"state" : 2,
			"stateStr" : "SECONDARY",
			"uptime" : 4352,
			"optime" : {
				"ts" : Timestamp(1459449254, 3),
				"t" : NumberLong(1)
			},
			"optimeDate" : ISODate("2016-03-31T18:34:14Z"),
			"lastHeartbeat" : ISODate("2016-03-31T19:44:39.992Z"),
			"lastHeartbeatRecv" : ISODate("2016-03-31T19:44:39.026Z"),
			"pingMs" : NumberLong(0),
			"syncingTo" : "localhost:27017",
			"configVersion" : 3
		},
		{
			"_id" : 2,
			"name" : "localhost:27019",
			"health" : 1,
			"state" : 2,
			"stateStr" : "SECONDARY",
			"uptime" : 4352,
			"optime" : {
				"ts" : Timestamp(1459449254, 3),
				"t" : NumberLong(1)
			},
			"optimeDate" : ISODate("2016-03-31T18:34:14Z"),
			"lastHeartbeat" : ISODate("2016-03-31T19:44:39.992Z"),
			"lastHeartbeatRecv" : ISODate("2016-03-31T19:44:40.397Z"),
			"pingMs" : NumberLong(0),
			"syncingTo" : "localhost:27017",
			"configVersion" : 3
		}
	],
	"ok" : 1
}
MongoDB Enterprise cross:PRIMARY> db.system.profile.find().readConcern("majority")
MongoDB Enterprise cross:PRIMARY> db.system.profile.find()
{ "op" : "insert", "ns" : "test.foo", "query" : { "insert" : "foo", "ordered" : true, "documents" : [ { "a" : 1, "_id" : ObjectId("56fd6da682bf194207b5ca3b") } ], "writeConcern" : { "wtimeout" : 10000, "w" : "majority" } }, "ninserted" : 1, "keyUpdates" : 0, "writeConflicts" : 0, "numYield" : 0, "locks" : { "Global" : { "acquireCount" : { "r" : NumberLong(4), "w" : NumberLong(4) } }, "Database" : { "acquireCount" : { "w" : NumberLong(3), "W" : NumberLong(1) } }, "Collection" : { "acquireCount" : { "w" : NumberLong(1), "W" : NumberLong(1) } }, "Metadata" : { "acquireCount" : { "w" : NumberLong(2) } }, "oplog" : { "acquireCount" : { "w" : NumberLong(2) } } }, "responseLength" : 100, "protocol" : "op_query", "millis" : 67, "execStats" : {  }, "ts" : ISODate("2016-03-31T18:34:14.727Z"), "client" : "127.0.0.1", "allUsers" : [ ], "user" : "" }
{ "op" : "command", "ns" : "test.foo", "command" : { "count" : "foo", "query" : {  }, "readConcern" : { "level" : "majority" } }, "keyUpdates" : 0, "writeConflicts" : 0, "numYield" : 0, "locks" : { "Global" : { "acquireCount" : { "r" : NumberLong(2) } }, "Database" : { "acquireCount" : { "r" : NumberLong(1) } }, "Collection" : { "acquireCount" : { "r" : NumberLong(1) } } }, "responseLength" : 62, "protocol" : "op_query", "millis" : 0, "execStats" : {  }, "ts" : ISODate("2016-03-31T18:34:14.729Z"), "client" : "127.0.0.1", "allUsers" : [ ], "user" : "" }
{ "op" : "query", "ns" : "test.foo", "query" : { "find" : "foo", "filter" : {  }, "readConcern" : { "level" : "majority" } }, "keysExamined" : 0, "docsExamined" : 1, "cursorExhausted" : true, "keyUpdates" : 0, "writeConflicts" : 0, "numYield" : 0, "locks" : { "Global" : { "acquireCount" : { "r" : NumberLong(2) } }, "Database" : { "acquireCount" : { "r" : NumberLong(1) } }, "Collection" : { "acquireCount" : { "r" : NumberLong(1) } } }, "nreturned" : 1, "responseLength" : 146, "protocol" : "op_query", "millis" : 0, "execStats" : { "stage" : "COLLSCAN", "filter" : { "$and" : [ ] }, "nReturned" : 1, "executionTimeMillisEstimate" : 0, "works" : 3, "advanced" : 1, "needTime" : 1, "needYield" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "invalidates" : 0, "direction" : "forward", "docsExamined" : 1 }, "ts" : ISODate("2016-03-31T18:34:14.729Z"), "client" : "127.0.0.1", "allUsers" : [ ], "user" : "" }
MongoDB Enterprise cross:PRIMARY>



 Comments   
Comment by Kay Kim (Inactive) [ 11/Apr/16 ]

The information on agg and count are in their respective pages.

Generated at Thu Feb 08 07:54:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.