Commit 295ffb0
committed
fix: 查询实例列表时支持按 clusters 参数过滤
修复 #210:subscribe 以及 selectOneHealthyInstance 传递 clusters 参数后未生效的问题。
原因:Service::get_instance_list 方法接收了 cluster_names 参数但未使用,
直接调用 get_all_instances 返回所有实例,导致 clusters 过滤完全失效。
修复:当 cluster_names 非空时,按 cluster_name 过滤实例列表;为空时保持原有行为。1 parent 098703e commit 295ffb0
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
400 | 412 | | |
401 | 413 | | |
402 | 414 | | |
| |||
0 commit comments