Commit c755234
authored
CNDB-12922 ANNOptions validation now checks the endpoint connection messaging version (#1624)
This makes sure the proper version is used, as
following CNDB-13203, each connection maintains its own version,
separated from the one recorded in the MessagingService.
### What is the issue
`ANNOptions#validate()` was previously checking endpoint versions via
`MessagingService#versions`: but following #13203, in order to resolve a
race condition, each endpoint connection tracks its own
`EndpointMessagingVersions` object, with the version negotiated during
handshake, while `MessagingService#versions` is updated with the max
version of each endpoint. It follows checking
`MessagingService#versions` might not rely on the right version used for
the connection.
### What does this PR fix and why was it fixed
This PR introduces a new `MessagingService` method to check the
connection version, and uses it inside `ANNOptions#validate()`.1 parent 10e7146 commit c755234
File tree
3 files changed
+32
-6
lines changed- src/java/org/apache/cassandra
- db/filter
- net
- test/distributed/org/apache/cassandra/distributed/test/sai
3 files changed
+32
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | | - | |
| 605 | + | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
| 608 | + | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
665 | 689 | | |
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
121 | | - | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | | - | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
0 commit comments