[SERVER-15141] stale config error flattened when thrown after yielding in count() command Created: 04/Sep/14  Updated: 10/Dec/14  Resolved: 04/Nov/14

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

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Greg Studer
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File stale_count_yield.js    
Issue Links:
Duplicate
duplicates SERVER-10382 Interrupted count commands don't retu... Closed
Related
related to SERVER-10382 Interrupted count commands don't retu... Closed
related to SERVER-15808 audit re-enabled yielding paths for s... Closed
Tested
Operating System: ALL
Participants:

 Description   

When a long-running count yields and a stale config exception is thrown (because of a migrate during the count, for example) it will be "flattened" into an unknown exception. This exception cannot then be retried automatically by mongos, but is passed to the user as:

Error: count failed: {
	"shards" : {
		
	},
	"cause" : {
		"ok" : 0,
		"errmsg" : "13388 [foo.bar] shard version not ok in Client::Context: version mismatch detected for foo.bar, stored major version 2 does not match received 1 ( ns : foo.bar, received : 1|0||540893992c1d4403aaa7955a, wanted : 2|0||540893992c1d4403aaa7955a, send )"
	},
	"ok" : 0,
	"errmsg" : "failed on : shard0000"
}

Reproduced on v2.4, v2.6 shows similar messaging but does not fail - still investigating. Master has different yielding behavior so it's not clear this still applies.



 Comments   
Comment by Greg Studer [ 03/Nov/14 ]

SERVER-10382 is the reason this does not occur in v2.6 - a backport should fix the issue.

EDIT: v2.8 yielding auditing is tracked in SERVER-15808

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