Commit 979b792
CNDB-13203: Use MessagingSuccess's version for cnx version (#1621)
### What is the issue
Fixes riptano/cndb#13203
The underlying problem is that the `OutboundConnection` needs to store
the message version from the peer. Otherwise, when the local
`current_version` is higher than the remove `current_version`, we store
the wrong value (we were storing the local value, not the agreed upon
value).
The PR also fixes an issue in the ANN_OPTIONS serialization logic that
we can hit in rare cases where the peers haven't yet connected, so the
validation logic that would prevent serialization due to a peer having
too low of a message version is skipped.
### What does this PR fix and why was it fixed
This PR fixes several issues related to upgrades by improving handshake
logic.
---------
Co-authored-by: Sergio Bossa <[email protected]>1 parent 840d5af commit 979b792
File tree
8 files changed
+103
-18
lines changed- src/java/org/apache/cassandra
- db/filter
- net
- test/unit/org/apache/cassandra
- db/filter
- net
8 files changed
+103
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
182 | 185 | | |
| 186 | + | |
183 | 187 | | |
184 | 188 | | |
185 | 189 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
91 | 100 | | |
92 | 101 | | |
93 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
94 | 108 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
440 | 447 | | |
441 | 448 | | |
442 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1117 | 1117 | | |
1118 | 1118 | | |
1119 | 1119 | | |
| 1120 | + | |
| 1121 | + | |
1120 | 1122 | | |
1121 | 1123 | | |
1122 | 1124 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
502 | 505 | | |
503 | 506 | | |
504 | 507 | | |
| |||
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
251 | 264 | | |
252 | 265 | | |
253 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| |||
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
| 127 | + | |
| 128 | + | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
132 | 141 | | |
133 | 142 | | |
134 | 143 | | |
| 144 | + | |
135 | 145 | | |
136 | 146 | | |
137 | 147 | | |
| |||
192 | 202 | | |
193 | 203 | | |
194 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
195 | 208 | | |
196 | | - | |
| 209 | + | |
197 | 210 | | |
198 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
199 | 224 | | |
200 | 225 | | |
201 | 226 | | |
202 | 227 | | |
203 | 228 | | |
| 229 | + | |
| 230 | + | |
204 | 231 | | |
205 | | - | |
| 232 | + | |
| 233 | + | |
206 | 234 | | |
207 | 235 | | |
208 | 236 | | |
209 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
210 | 240 | | |
211 | | - | |
212 | | - | |
| 241 | + | |
| 242 | + | |
213 | 243 | | |
214 | | - | |
| 244 | + | |
215 | 245 | | |
216 | | - | |
217 | | - | |
218 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
219 | 253 | | |
220 | 254 | | |
221 | 255 | | |
| |||
306 | 340 | | |
307 | 341 | | |
308 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
309 | 347 | | |
310 | 348 | | |
311 | 349 | | |
| |||
360 | 398 | | |
361 | 399 | | |
362 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
363 | 405 | | |
364 | 406 | | |
365 | 407 | | |
| |||
0 commit comments