Commit 3c1267a
committed
fix: use native transport port for broadcastRpcAddress in ClientRoutes
ClientRoutesTopologyMonitor.savePort() was saving the NLB proxy port
(e.g. 29043) as the fallback for broadcastRpcAddress construction.
This caused Metadata.findNode() to fail matching TOPOLOGY_CHANGE
REMOVED_NODE events (which carry the real native transport port 9042),
so decommissioned nodes were never removed from metadata.
Add a nativeTransportPort field to ClientRoutesConfig (default 9042,
configurable via advanced.client-routes.native-transport-port) and set
it in the ClientRoutesTopologyMonitor constructor. The savePort()
override is now a no-op since the port is already initialized.
broadcastRpcAddress is used only for event matching — connections go
through ClientRoutesEndPoint which resolves via NLB proxy addresses
in the routes cache.1 parent 62dc65f commit 3c1267a
8 files changed
Lines changed: 93 additions & 56 deletions
File tree
- core/src
- main
- java/com/datastax/oss/driver
- api/core/config
- internal/core
- context
- metadata
- resources
- test/java/com/datastax/oss/driver/internal/core/metadata
Lines changed: 49 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
| |||
73 | 83 | | |
74 | 84 | | |
75 | 85 | | |
| 86 | + | |
76 | 87 | | |
77 | | - | |
| 88 | + | |
| 89 | + | |
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
| |||
86 | 98 | | |
87 | 99 | | |
88 | 100 | | |
| 101 | + | |
89 | 102 | | |
90 | 103 | | |
91 | 104 | | |
| |||
108 | 121 | | |
109 | 122 | | |
110 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
111 | 136 | | |
112 | 137 | | |
113 | 138 | | |
| |||
127 | 152 | | |
128 | 153 | | |
129 | 154 | | |
130 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
131 | 158 | | |
132 | 159 | | |
133 | 160 | | |
134 | 161 | | |
135 | | - | |
| 162 | + | |
136 | 163 | | |
137 | 164 | | |
138 | 165 | | |
| |||
143 | 170 | | |
144 | 171 | | |
145 | 172 | | |
| 173 | + | |
| 174 | + | |
146 | 175 | | |
147 | 176 | | |
148 | 177 | | |
| |||
151 | 180 | | |
152 | 181 | | |
153 | 182 | | |
| 183 | + | |
154 | 184 | | |
155 | 185 | | |
156 | 186 | | |
| |||
208 | 238 | | |
209 | 239 | | |
210 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
211 | 256 | | |
212 | 257 | | |
213 | 258 | | |
| |||
216 | 261 | | |
217 | 262 | | |
218 | 263 | | |
219 | | - | |
| 264 | + | |
220 | 265 | | |
221 | 266 | | |
222 | 267 | | |
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
1100 | | - | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
1101 | 1111 | | |
1102 | 1112 | | |
1103 | 1113 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
944 | 944 | | |
945 | 945 | | |
946 | 946 | | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
947 | 952 | | |
948 | 953 | | |
949 | 954 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
548 | 553 | | |
549 | 554 | | |
550 | 555 | | |
| |||
core/src/main/java/com/datastax/oss/driver/internal/core/metadata/ClientRoutesTopologyMonitor.java
Lines changed: 8 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 450 | + | |
471 | 451 | | |
472 | 452 | | |
473 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1149 | 1160 | | |
1150 | 1161 | | |
1151 | 1162 | | |
| |||
Lines changed: 3 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1161 | 1161 | | |
1162 | 1162 | | |
1163 | 1163 | | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
1180 | | - | |
| 1164 | + | |
1181 | 1165 | | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | 1166 | | |
1187 | 1167 | | |
| 1168 | + | |
| 1169 | + | |
1188 | 1170 | | |
1189 | 1171 | | |
1190 | 1172 | | |
1191 | 1173 | | |
1192 | 1174 | | |
1193 | 1175 | | |
1194 | | - | |
1195 | | - | |
1196 | 1176 | | |
1197 | 1177 | | |
1198 | 1178 | | |
| |||
0 commit comments