Commit 32513bf
[Feat] add connection manager (#978)
## Purpose
Add connection manager to kv asu transport
## Modifications
- **ConnectionManager**: connection pool, which manages the three-layer
connection model: Pool (NPU->ASU:config) → Group (IP:Endpoint) → Channel
(QP)
1. As a member of AsuTransportImpl, the ConnectionManager registers the
link creation/deletion interface and link parameter information with
AsuTransportImpl. There is no derived class, and it is applicable to
different AsuTransportImpls.
2. Provides the following external interfaces: initialization,
destruction, route selection (RoundRobin/LeastLoaded), and exception
reporting (marking the channel status and adding the channel to the
exception list).
3. The background thread automatically re-establishes faulty channels.
(It checks the exception list, checks the inflight count of the channel,
and determines whether the channel can be destroyed and re-established.)
## Test
connection_concurrent_test.cc、connection_manager_test.cc、connection_transport_test.cc
<img width="1081" height="925"
alt="img_v3_02125_ae50282f-bb62-4c6e-810b-99f2a459ce5g"
src="https://github.com/user-attachments/assets/f8542fb1-4909-43d7-a08a-e51443bcc536"
/>
Co-authored-by: Frankie_lx <Frankie_lx@noreply.gitcode.com>1 parent 877946d commit 32513bf
19 files changed
Lines changed: 2303 additions & 12 deletions
File tree
- ucm/transport/kv/asu
- client/test
- common
- test/case
- trans
- include/asu_transport
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
198 | 205 | | |
199 | 206 | | |
200 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
454 | 461 | | |
455 | 462 | | |
456 | 463 | | |
| |||
0 commit comments