[JAVA-507] Recognize that a removed node is not part of a healthy replica set Created: 20/Jan/12 Updated: 19/Oct/16 Resolved: 21/Jan/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Imagine the following scenario: 1. You have a three-node replica set with members at localhost:30000, 2. The seed list as the driver knows it starts with the node at localhost:30000. 3. You run rs.remove('localhost:30000'). 4. You step down the current primary to force the driver to reconnect. In this situation, the Ruby driver would never reconnect. The reason 1. Iterates through the seed list until it can successfully connect to 2. Runs isMaster and verifies that the node has a 'hosts' field and 3. Iterates through the hosts list attempting to find a primary node. The issue is that the removed node still sees itself as a kind of The solution to the problem for now is to recognize
|
| Comments |
| Comment by Jeffrey Yemin [ 21/Jan/12 ] |
|
This is not actually a bug. The method com.mongodb.ReplicaSetStatus#getASecondary implements an equivalent algorithm. |