[SERVER-20924] Commands to mongos against SCCC config server results in all servers down Created: 14/Oct/15 Updated: 06/Dec/22 Resolved: 09/Nov/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.1.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Randolph Tan | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Assigned Teams: |
Sharding
|
| Operating System: | ALL |
| Participants: |
| Description |
|
if the command has a read preference setting even if they are all up. Attached sccc.js that demonstrates this issue. The problem appears to be coming from the _lockType helper: https://github.com/mongodb/mongo/blob/r3.1.9/src/mongo/client/syncclusterconnection.cpp#L621 where it tries to determine if the command is a write-type command. It does this by getting the name of the command and appending the help: 1 field. The problem comes in when there is a read preference setting and triggers the ServerSelectionMetadata::downconvert code here: https://github.com/mongodb/mongo/blob/r3.1.9/src/mongo/client/syncclusterconnection.cpp#L253 This will result in the command being wrapped around the 'query' field; causing the _lockType helper to run the "query" command and fail. The command will fail on all 3 config servers and will ultimately make mongos return the error "all servers down/unreachable when querying". |
| Comments |
| Comment by Randolph Tan [ 14/Oct/15 ] |
|
This is no longer an issue in current master (13b252e73427fbf669efc40a1c8305c8629ca618). This is because the opCommand down-conversion path is no longer exercised. This should be fine since the mongos is the last process that gets upgraded. |