Commit cc51a93
authored
Avoid counting votes from master-ineligible nodes (#43688)
Today if a master-eligible node is converted to a master-ineligible node it may
remain in the voting configuration, meaning that the master node may count its
publish responses as an indication that it has properly persisted the cluster
state. However master-ineligible nodes do not properly persist the cluster
state, so it is not safe to count these votes.
This change adjusts `CoordinationState` to take account of this from a safety
point of view, and also adjusts the `Coordinator` to prevent such nodes from
joining the cluster. Instead, it triggers a reconfiguration to remove from the
voting configuration a node that now appears to be master-ineligible before
processing its join.1 parent 4af1649 commit cc51a93
File tree
9 files changed
+189
-36
lines changed- server/src
- main/java/org/elasticsearch/cluster/coordination
- test/java/org/elasticsearch/cluster/coordination
- test/framework/src/main/java/org/elasticsearch/cluster/coordination
9 files changed
+189
-36
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| |||
Lines changed: 21 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
854 | 865 | | |
855 | | - | |
| 866 | + | |
856 | 867 | | |
857 | | - | |
| 868 | + | |
858 | 869 | | |
| 870 | + | |
859 | 871 | | |
860 | 872 | | |
861 | 873 | | |
| |||
893 | 905 | | |
894 | 906 | | |
895 | 907 | | |
896 | | - | |
897 | | - | |
898 | | - | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
899 | 911 | | |
900 | 912 | | |
901 | 913 | | |
| |||
904 | 916 | | |
905 | 917 | | |
906 | 918 | | |
907 | | - | |
| 919 | + | |
908 | 920 | | |
909 | 921 | | |
910 | 922 | | |
911 | 923 | | |
912 | 924 | | |
913 | | - | |
| 925 | + | |
914 | 926 | | |
915 | 927 | | |
916 | 928 | | |
| |||
1349 | 1361 | | |
1350 | 1362 | | |
1351 | 1363 | | |
1352 | | - | |
| 1364 | + | |
1353 | 1365 | | |
1354 | 1366 | | |
1355 | 1367 | | |
| |||
1387 | 1399 | | |
1388 | 1400 | | |
1389 | 1401 | | |
1390 | | - | |
| 1402 | + | |
1391 | 1403 | | |
1392 | 1404 | | |
1393 | 1405 | | |
| |||
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
248 | 254 | | |
249 | 255 | | |
250 | 256 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
734 | 736 | | |
735 | 737 | | |
736 | 738 | | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
737 | 744 | | |
738 | 745 | | |
739 | 746 | | |
| |||
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
1206 | 1207 | | |
1207 | 1208 | | |
1208 | 1209 | | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
1209 | 1224 | | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1210 | 1266 | | |
1211 | 1267 | | |
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
476 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
477 | 480 | | |
478 | | - | |
| 481 | + | |
479 | 482 | | |
480 | | - | |
| 483 | + | |
| 484 | + | |
481 | 485 | | |
482 | 486 | | |
483 | 487 | | |
| |||
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
492 | | - | |
| 496 | + | |
493 | 497 | | |
494 | 498 | | |
495 | 499 | | |
| |||
499 | 503 | | |
500 | 504 | | |
501 | 505 | | |
502 | | - | |
| 506 | + | |
503 | 507 | | |
504 | 508 | | |
505 | 509 | | |
| |||
572 | 576 | | |
573 | 577 | | |
574 | 578 | | |
575 | | - | |
576 | | - | |
| 579 | + | |
| 580 | + | |
577 | 581 | | |
578 | 582 | | |
579 | 583 | | |
| |||
0 commit comments