This is an automated email from the ASF dual-hosted git repository.
samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new a9a83dc884 Simulation test fixes
a9a83dc884 is described below
commit a9a83dc884621f0bfdf2c37be9e7e8fcf0081da1
Author: Sam Tunnicliffe <[email protected]>
AuthorDate: Mon Oct 14 16:21:52 2024 +0100
Simulation test fixes
* During replacement, correctly set token on the joining instance
* In bootstrap, we were not correctly stepping through the join
operation
* When investigating bootstrap issues, it was found that we were
not running repairPaxosForTopologyChange on this path.
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for
CASSANDRA-19997
---
CHANGES.txt | 1 +
src/java/org/apache/cassandra/tcm/sequences/BootstrapAndJoin.java | 2 ++
.../main/org/apache/cassandra/simulator/cluster/KeyspaceActions.java | 2 +-
.../main/org/apache/cassandra/simulator/cluster/OnClusterJoin.java | 2 +-
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 0269f479b0..0e454fa198 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
5.1
+ * In simulation tests, correctly set the tokens of replacement nodes
(CASSANDRA-19997)
* During TCM upgrade, retain all properties of existing system tables
(CASSANDRA-19992)
* Properly cancel in-flight futures and reject requests in EpochAwareDebounce
during shutdown (CASSANDRA-19848)
* Provide clearer exception message on failing commitlog_disk_access_mode
combinations (CASSANDRA-19812)
diff --git a/src/java/org/apache/cassandra/tcm/sequences/BootstrapAndJoin.java
b/src/java/org/apache/cassandra/tcm/sequences/BootstrapAndJoin.java
index 7d316e1ea1..15182fc92b 100644
--- a/src/java/org/apache/cassandra/tcm/sequences/BootstrapAndJoin.java
+++ b/src/java/org/apache/cassandra/tcm/sequences/BootstrapAndJoin.java
@@ -353,6 +353,8 @@ public class BootstrapAndJoin extends
MultiStepOperation<Epoch>
logger.info("Resetting bootstrap progress to start fresh");
SystemKeyspace.resetAvailableStreamedRanges();
}
+
+ StorageService.instance.repairPaxosForTopologyChange("bootstrap");
Future<StreamState> bootstrapStream =
StorageService.instance.startBootstrap(metadata, beingReplaced, movements,
strictMovements);
try
{
diff --git
a/test/simulator/main/org/apache/cassandra/simulator/cluster/KeyspaceActions.java
b/test/simulator/main/org/apache/cassandra/simulator/cluster/KeyspaceActions.java
index 1cff2ab08f..4b6caa0164 100644
---
a/test/simulator/main/org/apache/cassandra/simulator/cluster/KeyspaceActions.java
+++
b/test/simulator/main/org/apache/cassandra/simulator/cluster/KeyspaceActions.java
@@ -281,8 +281,8 @@ public class KeyspaceActions extends ClusterActions
joined.add(join);
joined.remove(leave);
left.add(leave);
- TokenPlacementModel.ReplicatedRanges placementsAfter =
placements(joined, currentRf);
nodeLookup.setTokenOf(join, nodeLookup.tokenOf(leave));
+ TokenPlacementModel.ReplicatedRanges placementsAfter =
placements(joined, currentRf);
Topology during = recomputeTopology(placementsBefore,
placementsAfter);
updateTopology(during);
Topology after = recomputeTopology(placementsAfter,
placementsAfter);
diff --git
a/test/simulator/main/org/apache/cassandra/simulator/cluster/OnClusterJoin.java
b/test/simulator/main/org/apache/cassandra/simulator/cluster/OnClusterJoin.java
index 53484ab318..bb36ad7218 100644
---
a/test/simulator/main/org/apache/cassandra/simulator/cluster/OnClusterJoin.java
+++
b/test/simulator/main/org/apache/cassandra/simulator/cluster/OnClusterJoin.java
@@ -111,7 +111,7 @@ class OnClusterJoin extends OnClusterChangeTopology
BootstrapAndJoin bootstrapAndJoin = ((BootstrapAndJoin)
sequence);
assert bootstrapAndJoin.next.ordinal() == kind :
String.format("Expected next step to be %s, but got %s",
Transformation.Kind.values()[kind], bootstrapAndJoin.next);
- boolean res =
bootstrapAndJoin.finishJoiningRing().executeNext().isContinuable();
+ boolean res = bootstrapAndJoin.executeNext().isContinuable();
assert res;
});
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]