Commit 820a3c0
HCD-241: DSE 6.8/9 upgradeability (#2240)
This PR addresses critical compatibility issues discovered during DSE to
HCD (Hyper-Converged Database) upgrade scenarios. The changes focus on
ensuring smooth interoperability between DSE 6.8+ nodes and HCD nodes
during mixed-version cluster operations.
**Problem:** When upgrading from DSE to HCD, troubleshooting connection
and gossip issues was difficult due to insufficient logging.
**Solution:** Added comprehensive logging throughout the handshake and
gossip processes, including:
- Port selection logic for DSE → HCD upgrades
- Messaging version negotiation during handshake
- Protocol proposals from DSE peers
- Gossip state values (both loaded and saved)
- Connection initialization events
**Why it matters:** This gives operators visibility into what's
happening during the upgrade process, making it much easier to diagnose
and resolve issues in production environments.
---
**Problem:** Nodes would crash with `ArrayIndexOutOfBoundsException`
when processing gossip messages from pre-4.0 nodes. This happened
because the code assumed certain delimiters would always be present in
address and status values, but older nodes sent data in different
formats. Both INTERNAL_ADDRESS_AND_PORT and NATIVE_ADDRESS_AND_PORT
could arrive without port delimiters (e.g., "10.0.0.1" instead of
"10.0.0.1:7000"), and STATUS_WITH_PORT could arrive without additional
port information.
**Solution:** Added defensive length checks after splitting gossip
values to gracefully handle cases where expected delimiters are missing:
- Internal and native IP addresses without ports (e.g., "10.0.0.1" vs
"10.0.0.1:7000")
- Status values without additional port information
**Why it matters:** Prevents cluster instability and crashes during
mixed-version operations.
---
**Problem:** During startup connectivity checks, HCD nodes were
attempting to send PING requests to DSE 6.8+ peers, but these versions
don't support PING_REQ messages (similar to DSE 6.x and Cassandra 3.x).
This resulted in noisy error logs during cluster startup.
**Solution:** Extended the existing version detection logic to recognize
and skip PING requests for DSE 6.8+ peers during the startup
connectivity check phase.
**Why it matters:** Eliminates unnecessary error logs when HCD nodes
join or restart in a mixed DSE/HCD environment.
---
**Problem:** When keyspace schemas were updated during migration,
User-Defined Types (UDTs) from the previous schema could be lost if they
weren't explicitly present in the new schema. This caused failures when
inherited tables depended on these types.
**Solution:** Modified the schema transformation logic to preserve UDTs
from the previous schema when they don't exist in the new schema,
ensuring dependent tables continue to function correctly.
**Why it matters:** Prevents data model corruption and application
failures during schema migrations, particularly important when dealing
with complex schemas that use inheritance and UDTs.
---
These changes collectively improve the robustness and reliability of DSE
to HCD upgrades by:
- Making issues easier to diagnose through better logging
- Preventing crashes from malformed gossip data
- Ensuring protocol compatibility across versions
- Preserving schema integrity during migrations1 parent 7deb016 commit 820a3c0
7 files changed
Lines changed: 475 additions & 7 deletions
File tree
- src/java/org/apache/cassandra
- gms
- net
- schema
- test/unit/org/apache/cassandra
- gms
- net
- schema
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
494 | | - | |
| 496 | + | |
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
498 | | - | |
499 | 500 | | |
500 | | - | |
| 501 | + | |
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
| |||
514 | 515 | | |
515 | 516 | | |
516 | 517 | | |
517 | | - | |
| 518 | + | |
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
522 | 523 | | |
523 | | - | |
| 524 | + | |
524 | 525 | | |
525 | 526 | | |
526 | 527 | | |
527 | | - | |
528 | 528 | | |
529 | | - | |
| 529 | + | |
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
542 | 643 | | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
348 | 354 | | |
349 | 355 | | |
350 | 356 | | |
| |||
379 | 385 | | |
380 | 386 | | |
381 | 387 | | |
| 388 | + | |
| 389 | + | |
382 | 390 | | |
383 | 391 | | |
384 | 392 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
212 | 220 | | |
213 | 221 | | |
214 | 222 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
227 | 232 | | |
228 | 233 | | |
229 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
230 | 251 | | |
231 | 252 | | |
232 | 253 | | |
| |||
0 commit comments