[SERVER-1560] first query against sharded collection fails with "too many attempts to update config, failing" Created: 03/Aug/10  Updated: 12/Jul/16  Resolved: 03/Aug/10

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 1.5.7, 1.5.8
Fix Version/s: 1.6.0

Type: Bug Priority: Major - P3
Reporter: J Greely Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MacOS X 10.6.4, mongodb-osx-x86_64-1.5.8


Operating System: OS X
Participants:

 Description   

Using a 10-shard cluster all running on the same host (same setup I posted to mongodb-dev for 1.5.6, http://s3.amazonaws.com/dotclue.org/shardtest-1.5.6.tgz), the first query in a new connection always fails with the same error:

% mongo jmdict
MongoDB shell version: 1.5.8
connecting to: jmdict
> db.dict.find(

{"r_ele.reb":"???"}

)
error:

{ "$err" : "too many attempts to update config, failing", "code" : 10195 }

The log file for the mongos I'm connecting to shows the following for each failure:

Tue Aug 3 13:06:20 [conn10] ns: jmdict.dict ClusteredCursor::query ShardConnection had to change attempt: 0
Tue Aug 3 13:06:20 [conn10] ns: jmdict.dict ClusteredCursor::query ShardConnection had to change attempt: 1
Tue Aug 3 13:06:21 [conn10] ns: jmdict.dict ClusteredCursor::query ShardConnection had to change attempt: 2
Tue Aug 3 13:06:23 [conn10] ns: jmdict.dict ClusteredCursor::query ShardConnection had to change attempt: 3
Tue Aug 3 13:06:26 [conn10] ns: jmdict.dict ClusteredCursor::query ShardConnection had to change attempt: 4
Tue Aug 3 13:06:30 [conn10] ns: jmdict.dict ClusteredCursor::query ShardConnection had to change attempt: 5
Tue Aug 3 13:06:30 [conn10] UserException: too many attempts to update config, failing

If I run db.dict.count() before the query, it succeeds every time:

% mongo jmdict
MongoDB shell version: 1.5.8
connecting to: jmdict
> db.dict.count()
877887
> db.dict.find(

{"r_ele.reb":"???"}

)
{ "_id" : ObjectId("4c5871618fcf08e654dc3f04"), "trans" : [

{ "trans_det" : [ "Anata" ], "name_type" : [ "surname" ] }

], "k_ele" : [

{ "keb" : "?" }

], "r_ele" : [

{ "reb" : "???" }

], "type" : "name", "sense" : [ ] }
...



 Comments   
Comment by Eliot Horowitz (Inactive) [ 04/Aug/10 ]

Made a bit better - shouldn't have that first error anymore

Comment by auto [ 04/Aug/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: when access namespace for the first time, prep all connections SERVER-1560
http://github.com/mongodb/mongo/commit/c542dbd78a75511491596a427b67dbca62716a50

Comment by auto [ 04/Aug/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: when access namespace for the first time, prep all connections SERVER-1560
http://github.com/mongodb/mongo/commit/33b7eb758b5cff2e35ee21e639e3bd7166d94e7b

Comment by J Greely [ 04/Aug/10 ]

Confirmed fixed in latest nightly (git version1a5c0a6723eb67b1e4f1c3d6f043ffeca6c7a6c7). I still get a single line in the mongos log if the first thing I do in a new connection is a find(), but the query always succeeds:

Tue Aug 3 22:57:02 [conn12] ns: jmdict.dict ClusteredCursor::query ShardConnection had to change attempt: 0

Comment by Eliot Horowitz (Inactive) [ 03/Aug/10 ]

Just pushed a new build: http://buildbot.mongodb.org/waterfall?show=Nightly%20OS%20X%2010.5%2064-bit

Can you give this a try? I'm pretty sure it fixes this problem.

Comment by auto [ 03/Aug/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: check all shard connections at once so we don't get cascading failure SERVER-1560
http://github.com/mongodb/mongo/commit/c1a0ce0228d75d62a10eeab6aa8aa0ee65b64958

Comment by J Greely [ 03/Aug/10 ]

(just noticed that the search string didn't make it through; the r_ele.reb search requires hiragana, which Jira doesn't like. Here's a valid search against another field that takes English)

% mongo jmdict
MongoDB shell version: 1.5.8
connecting to: jmdict
> db.dict.find(

{"sense.gloss.content":"food"}

)
error:

{ "$err" : "too many attempts to update config, failing", "code" : 10195 }
Generated at Thu Feb 08 02:57:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.