Commit 2c17fbb
JCBC-1642: ClusterManager must use resolved SeedNodes
Previously the cluster manager would use the seed nodes directly
from the connection string, but this is a problem because if
DNS SRV is used it would try to connect to the dns host instead
of the resolved hosts.
This changeset updates the code so that the potentially resolved
seed hosts are used instead of the original one from the connection
string.
Note that this is still not 100% accurate since the cluster topology
might drift over time, but it fixes the issue at hand. Further
improvements can be maded alongside if neeeded in a later
changeset.
Change-Id: Ie96186d72b01c783172544433a4c456be15ced95
Reviewed-on: http://review.couchbase.org/c/couchbase-java-client/+/129906
Reviewed-by: Graham Pople <grahampople@gmail.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>1 parent 29c85bd commit 2c17fbb
File tree
4 files changed
+59
-30
lines changed- src/main/java/com/couchbase/client/java
- cluster
4 files changed
+59
-30
lines changedLines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | 140 | | |
142 | 141 | | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 274 | + | |
| 275 | + | |
279 | 276 | | |
280 | | - | |
281 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
282 | 280 | | |
283 | 281 | | |
284 | 282 | | |
| |||
294 | 292 | | |
295 | 293 | | |
296 | 294 | | |
297 | | - | |
| 295 | + | |
298 | 296 | | |
299 | 297 | | |
300 | 298 | | |
| |||
481 | 479 | | |
482 | 480 | | |
483 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
484 | 489 | | |
485 | 490 | | |
486 | | - | |
| 491 | + | |
487 | 492 | | |
488 | 493 | | |
489 | 494 | | |
| |||
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
392 | | - | |
| 391 | + | |
393 | 392 | | |
394 | 393 | | |
395 | 394 | | |
| |||
404 | 403 | | |
405 | 404 | | |
406 | 405 | | |
407 | | - | |
408 | | - | |
| 406 | + | |
409 | 407 | | |
410 | 408 | | |
411 | 409 | | |
| |||
Lines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
695 | 701 | | |
696 | 702 | | |
697 | 703 | | |
698 | | - | |
699 | | - | |
| 704 | + | |
| 705 | + | |
700 | 706 | | |
701 | 707 | | |
702 | 708 | | |
703 | | - | |
| 709 | + | |
704 | 710 | | |
705 | 711 | | |
706 | 712 | | |
707 | 713 | | |
708 | | - | |
| 714 | + | |
709 | 715 | | |
710 | 716 | | |
711 | 717 | | |
| |||
Lines changed: 27 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
38 | 49 | | |
39 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
40 | 54 | | |
41 | 55 | | |
| 56 | + | |
42 | 57 | | |
43 | 58 | | |
44 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
45 | 65 | | |
46 | 66 | | |
47 | 67 | | |
| |||
162 | 182 | | |
163 | 183 | | |
164 | 184 | | |
165 | | - | |
166 | | - | |
| 185 | + | |
| 186 | + | |
167 | 187 | | |
168 | 188 | | |
0 commit comments