[SERVER-77195] executor::ConnectionPool should appropriately handle the case where a connection is returned with a network error Created: 16/May/23 Updated: 29/Oct/23 Resolved: 15/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 6.0.7, 7.0.0-rc4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | George Wangensteen | Assignee: | George Wangensteen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Service Arch
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v7.0, v6.0
|
||||
| Sprint: | Service Arch 2023-06-12, Service Arch 2023-06-26 | ||||
| Participants: | |||||
| Description |
|
Essentially, we need to address this TODO: https://github.com/mongodb/mongo/blob/744678da09dcab9885ae6af3e368864387fbfb82/src/mongo/executor/connection_pool.cpp#L1013 Currently, when a connection is checked out from the pool and is returned with failure indicated, we discard that individual connection. However, we don't examine the failure in any way, and don't drop other connections to the same host (and bump the SpecificPool generation appropriately) if the failure is a Network error or other error that leads us to believe that the host is down and current-generation connections are likely to be unhealthy. This is distinct from the behavior in the case where we observe a network-error on a connection during the refresh process; in this case, we treat the host as down, bump the generation of the SpecificPool to that host, and drop other connections to that host. The cases of a network error on a returned connection vs. one that has finished refreshing are very similar and should probably be treated in the same manner. |
| Comments |
| Comment by Githook User [ 15/Jun/23 ] |
|
Author: {'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com', 'username': 'gewa24'}Message: |
| Comment by Githook User [ 14/Jun/23 ] |
|
Author: {'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com', 'username': 'gewa24'}Message: (cherry picked from commit 085eb1f4d5aba0414df96071084aa0d0620ba153) |
| Comment by Githook User [ 13/Jun/23 ] |
|
Author: {'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com', 'username': 'gewa24'}Message: |