Commit f342755
committed
Drop the MEET packet if the link node is in handshake state
After valkey-io#1307 got merged, we notice there is a assert happen in setClusterNodeToInboundClusterLink:
```
=== ASSERTION FAILED ===
==> '!link->node' is not true
```
In valkey-io#778, we will call setClusterNodeToInboundClusterLink to attach the node to the link
during the MEET processing, so if we receive a another MEET packet in a short time, the
node is still in handshake state, we will meet this assert and crash the server.
If the link is bound to a node and the node is in the handshake state, and we receive
a MEET packet, it may be that the sender sent multiple MEET packets when reconnecting,
and in here we are dropping the MEET. Note that in getNodeFromLinkAndMsg, the node in
the handshake state has a random name and not truly "known", so we don't know the sender.
Dropping the MEET packet can prevent us from creating a random node, avoid incorrect
link binding, and avoid duplicate MEET packet eliminate the handshake state.
Signed-off-by: Binbin <[email protected]>1 parent 32f2c73 commit f342755
1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3004 | 3004 | | |
3005 | 3005 | | |
3006 | 3006 | | |
3007 | | - | |
| 3007 | + | |
| 3008 | + | |
3008 | 3009 | | |
3009 | 3010 | | |
3010 | 3011 | | |
| |||
3095 | 3096 | | |
3096 | 3097 | | |
3097 | 3098 | | |
3098 | | - | |
| 3099 | + | |
3099 | 3100 | | |
3100 | 3101 | | |
3101 | 3102 | | |
| |||
3111 | 3112 | | |
3112 | 3113 | | |
3113 | 3114 | | |
3114 | | - | |
3115 | | - | |
| 3115 | + | |
| 3116 | + | |
3116 | 3117 | | |
3117 | 3118 | | |
3118 | 3119 | | |
| |||
3121 | 3122 | | |
3122 | 3123 | | |
3123 | 3124 | | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
3124 | 3137 | | |
3125 | 3138 | | |
3126 | 3139 | | |
| |||
0 commit comments