Commit 5cc2b25
authored
Fix cluster myself CLUSTER SLOTS/NODES wrong port after updating port/tls-port (valkey-io#2186)
When modifying port or tls-port through config set, we need to call
clusterUpdateMyselfAnnouncedPorts to update myself's port, otherwise
CLUSTER SLOTS/NODES will be old information from myself's perspective.
In addition, in some places, such as clusterUpdateMyselfAnnouncedPorts
and clusterUpdateMyselfIp, beforeSleep save is added so that the
new ip info can be updated to nodes.conf.
Remove clearCachedClusterSlotsResponse in updateClusterAnnouncedPort
since now we add beforeSleep save in clusterUpdateMyselfAnnouncedPorts,
and it will call clearCachedClusterSlotsResponse.
Signed-off-by: Binbin <[email protected]>1 parent 3bc40be commit 5cc2b25
File tree
3 files changed
+43
-1
lines changed- src
- tests/unit/cluster
3 files changed
+43
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1024 | 1024 | | |
1025 | 1025 | | |
1026 | 1026 | | |
| 1027 | + | |
1027 | 1028 | | |
1028 | 1029 | | |
1029 | 1030 | | |
| |||
1054 | 1055 | | |
1055 | 1056 | | |
1056 | 1057 | | |
| 1058 | + | |
1057 | 1059 | | |
1058 | 1060 | | |
1059 | 1061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2473 | 2473 | | |
2474 | 2474 | | |
2475 | 2475 | | |
| 2476 | + | |
2476 | 2477 | | |
2477 | 2478 | | |
2478 | 2479 | | |
| |||
2660 | 2661 | | |
2661 | 2662 | | |
2662 | 2663 | | |
2663 | | - | |
2664 | 2664 | | |
2665 | 2665 | | |
2666 | 2666 | | |
| |||
2719 | 2719 | | |
2720 | 2720 | | |
2721 | 2721 | | |
| 2722 | + | |
2722 | 2723 | | |
2723 | 2724 | | |
2724 | 2725 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 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 | + | |
56 | 95 | | |
0 commit comments