[SERVER-2161] Differentiate recovery from "not master" Created: 30/Nov/10 Updated: 12/Jul/16 Resolved: 08/Dec/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 1.7.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Robert Stam | Assignee: | Kristina Chodorow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
A secondary in a replica set was sent a QueryMessage with the SlaveOk flag set, and it responded with the QueryFailure flag set and $err = "not master". Apparently "not master" can be returned for multiple reasons (not just because a query is sent to a secondary without setting the SlaveOk flag); for example: if the secondary is in recovery mode it responds to queries with "not master". It would be helpful to the caller (and/or driver) to be able to tell the difference between a real "not master" and other things blocking a query like "in recovery mode". |
| Comments |
| Comment by Kristina Chodorow (Inactive) [ 08/Dec/10 ] |
|
This was fixed a while ago in the 1.7 branch, it just hasn't been backported. |
| Comment by Robert Stam [ 08/Dec/10 ] |
|
I was never able to reproduce this either, but I will forward you an email that contains wireshark traces showing it actually happening. |
| Comment by Kristina Chodorow (Inactive) [ 08/Dec/10 ] |
|
I am unable to reproduce this. If the member is not a secondary, it give the error message "not master or secondary, can't read". Can you give more details on reproducing? |