[SERVER-18849] find/getMore against config server content cannot use new host targeting logic Created: 05/Jun/15 Updated: 19/Sep/15 Resolved: 10/Sep/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.8 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | David Storch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Quint 9 09/18/15 |
| Participants: |
| Description |
|
In MongoDB 3.2 with the switch to supporting config servers as replica sets we will use a uniform host targeting logic to figure out to which host to send a particular operation. This applies to both operations coming from the CatalogManager and operations coming through connections (i.e., queries, updates, etc to the config and admin databases). This logic will not work in the transient state where customers are upgrading to config servers as replica sets, because they will have a MongoS version 3.2 backed by a legacy (3-host) config server. The shard targeting logic is not intended to work against such legacy config servers and for this reason, only legacy-style queries and update should be supported against the config or admin databases. It is acceptable behaviour to have the find/getMore commands fail if run against 3.2 MongoS still running with a legacy confing server triplet. As part of the find/getMore commands work we need to write tests to ensure this upconversion does not happen. |
| Comments |
| Comment by David Storch [ 18/Sep/15 ] | ||||||||||||||||||||
|
david.golden, yes, in master right now mongos will always return maxWireVersion 4, regardless of the config server mode. This was part of the following commit:
These are packaged into the same change because adding support for querying SCCC mode config servers in the new find command path implies full find command support, regardless of config server mode. | ||||||||||||||||||||
| Comment by David Golden [ 18/Sep/15 ] | ||||||||||||||||||||
I thought this was fixed so that 3.2 mongos always returns maxWireVersion 4 but I don't see that mentioned in a commit message. Is there a commit for that? David | ||||||||||||||||||||
| Comment by Githook User [ 17/Sep/15 ] | ||||||||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: | ||||||||||||||||||||
| Comment by Githook User [ 12/Sep/15 ] | ||||||||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: Temporarily addresses a libmongoscore <=> libcluster_query circular | ||||||||||||||||||||
| Comment by Githook User [ 10/Sep/15 ] | ||||||||||||||||||||
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: | ||||||||||||||||||||
| Comment by David Storch [ 24/Aug/15 ] | ||||||||||||||||||||
|
EDIT: Instead of diverting queries against SCCC config servers to the old query path, the new plan is to add support for querying SCCC config to the new query path. This means that mongos can unconditionally return a maxWireVersion of 4, regardless of the config server mode. It also means that a find command targeting the config shard should always work as expected. | ||||||||||||||||||||
| Comment by Githook User [ 24/Aug/15 ] | ||||||||||||||||||||
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: A mongod will return a maxWireVersion of 4 to indicate support for the find and | ||||||||||||||||||||
| Comment by David Storch [ 20/Aug/15 ] | ||||||||||||||||||||
|
Any sharding test which explicitly issues queries over config server content will currently fail with a segfault when --readMode commands is enabled:
The particular failure mode is that runQueryWithoutRetrying() in cluster_find.cpp is dereferencing a null RemoteCommandTargeter (i.e. the config shard does not have a targeter). |