Commit d83ec08
committed
fix(client): connect nodes lazily in all-shards/all-nodes fan-out
getAllMasterClients/getAllClients silently skipped nodes without a
connected client. With minimizeConnections (or a partially connected
cluster) all_shards/all_nodes commands fanned out to a subset of nodes —
or none, resolving undefined: PING via sendCommand returned undefined,
DBSIZE could sum a subset without any error. Route through nodeClient(),
the same lazy connect-or-reuse accessor keyed routing uses.
getAllClients no longer yields dedicated PubSub connections; they cannot
run regular commands.
Also guard the policy dispatch against an empty fan-out — failing loud
beats resolving undefined.1 parent 7b252c1 commit d83ec08
2 files changed
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
796 | | - | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
797 | 806 | | |
798 | 807 | | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
| 808 | + | |
| 809 | + | |
807 | 810 | | |
808 | 811 | | |
809 | 812 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
509 | 513 | | |
510 | 514 | | |
511 | 515 | | |
| |||
0 commit comments