Commit bc1faf2
committed
storage_api: fix TestDecommissionSelf flake
TestDecommissionSelf was flaking with timeouts waiting for decommissioned
nodes to observe their own DECOMMISSIONED status. The test would fail when
node 4 (one of the decommissioned nodes) never saw its liveness record
update to DECOMMISSIONED within the 5-second timeout.
The likely root cause is a race condition in how decommission status
propagates: when a node is marked as decommissioned, the updated liveness
record is gossiped to all nodes. However, if other nodes receive this gossip
update before the decommissioned node does, they will write a tombstone to
local storage and subsequently reject all RPCs from the decommissioned node,
including gossip messages. This can prevent the decommissioned node from ever
learning about its own status change.
This commit fixes the test by only verifying the cluster state from the
perspective of non-decommissioned nodes. We now assert that:
1. Active nodes see themselves as ACTIVE
2. Active nodes see the decommissioned nodes as DECOMMISSIONED
We no longer attempt to verify that decommissioned nodes observe their own
status, since this is not guaranteed due to the gossip/tombstone race.
Fixes cockroachdb#156402.
Fixes cockroachdb#156104.
Fixes cockroachdb#154474.
Release note: None
Epic: None1 parent e00f221 commit bc1faf2
1 file changed
+27
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
705 | | - | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
706 | 713 | | |
707 | 714 | | |
708 | | - | |
| 715 | + | |
709 | 716 | | |
710 | 717 | | |
711 | | - | |
712 | | - | |
| 718 | + | |
713 | 719 | | |
714 | 720 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
719 | 738 | | |
720 | 739 | | |
721 | 740 | | |
| |||
0 commit comments