[SERVER-20122] Throw out connections created while adding a new shard Created: 25/Aug/15 Updated: 02/Sep/15 Resolved: 02/Sep/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Sharding 9 (09/18/15) | ||||||||
| Participants: | |||||||||
| Description |
|
When adding a new shard, we create a connection to the new shard to validate some basic properties about it before adding it as a shard. This will put a connection to that shard into the connection pool used by the NetworkInterface. If we successfully add that shard, then try to query it, we run the risk of using the already existing connection, which will not have run the part of the ShardingNetworkConnectionHook that sends the shard initialization information. If before we finish the addShard command we throw out all connections to that shard then we know that the next time we try to talk to that shard we will have to create a new connection, guaranteeing that the shard initialization logic gets run |
| Comments |
| Comment by Spencer Brody (Inactive) [ 02/Sep/15 ] |
|
We avoid this issue by using a different TaskExecutor (and thus different NetworkInterface) for sending commands to servers being added in addShard. |