Commit 870d024
committed
RDBC-948: Ensure topology handling matches C# Client.
Handles network errors during connection failover more reliably by catching both requests-level and OS-level socket exceptions. This mirrors the behavior of the C# client and prevents connection failures due to DNS resolution issues or server unavailability.
Also, refactors the failover logic to improve retry behavior on failed requests, ensuring that the next preferred node is chosen and retried, while avoiding infinite loops by checking for already failed nodes. Notifies listeners about failed requests with full details, and broadcasts commands where applicable to improve efficiency. Finally, ensures that only member nodes without failures are chosen first.
Adds tests to verify failover scenarios with invalid DNS configurations and unreachable endpoints.1 parent 2161369 commit 870d024
3 files changed
Lines changed: 135 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
637 | 643 | | |
638 | 644 | | |
639 | 645 | | |
| |||
805 | 811 | | |
806 | 812 | | |
807 | 813 | | |
808 | | - | |
| 814 | + | |
| 815 | + | |
809 | 816 | | |
810 | 817 | | |
811 | 818 | | |
| |||
1159 | 1166 | | |
1160 | 1167 | | |
1161 | 1168 | | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
1165 | 1172 | | |
| 1173 | + | |
1166 | 1174 | | |
1167 | | - | |
1168 | 1175 | | |
1169 | 1176 | | |
| 1177 | + | |
1170 | 1178 | | |
1171 | | - | |
1172 | 1179 | | |
1173 | 1180 | | |
1174 | | - | |
| 1181 | + | |
1175 | 1182 | | |
1176 | 1183 | | |
| 1184 | + | |
1177 | 1185 | | |
1178 | 1186 | | |
| 1187 | + | |
1179 | 1188 | | |
1180 | 1189 | | |
1181 | 1190 | | |
1182 | 1191 | | |
1183 | | - | |
1184 | | - | |
| 1192 | + | |
1185 | 1193 | | |
| 1194 | + | |
| 1195 | + | |
1186 | 1196 | | |
1187 | 1197 | | |
1188 | 1198 | | |
1189 | 1199 | | |
| 1200 | + | |
1190 | 1201 | | |
1191 | 1202 | | |
1192 | 1203 | | |
1193 | | - | |
| 1204 | + | |
| 1205 | + | |
1194 | 1206 | | |
| 1207 | + | |
1195 | 1208 | | |
1196 | 1209 | | |
1197 | 1210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
0 commit comments