dcapwell commented on code in PR #3877:
URL: https://github.com/apache/cassandra/pull/3877#discussion_r1945325629
##########
test/distributed/org/apache/cassandra/fuzz/topology/AccordTopologyMixupTest.java:
##########
@@ -240,13 +245,39 @@ public String createSchema()
private static class AccordState extends State<Spec>
{
+ private final Int2ObjectHashMap<String> instanceEpochState = new
Int2ObjectHashMap<>();
private final ListenerHolder listener;
public AccordState(RandomSource rs)
{
super(rs, AccordTopologyMixupTest::createSchemaSpec,
AccordTopologyMixupTest::cqlOperations);
this.listener = new ListenerHolder(this);
+ this.preActions.add(this::populateEpochState);
+ }
+
+ private void populateEpochState()
+ {
+ String cql = "SELECT * FROM " + VIRTUAL_VIEWS + ".accord_epoch";
+ for (var inst : cluster)
+ {
+ int num = inst.config().num();
+ if (inst.isShutdown())
+ {
+ instanceEpochState.put(num, "unknown");
+ continue;
+ }
+ try
+ {
+ SimpleQueryResult qr = Retry.retryWithBackoffBlocking(5,
() -> cluster.get(num).executeInternalWithResult(cql));
+ instanceEpochState.put(num,
TableBuilder.toStringPiped(qr.names(), QueryResults.stringify(qr)));
Review Comment:
this produces the following format
```
epoch | ready | ready_coordinate | ready_data | ready_metadata | ready_reads
4 | true | success | success | success | success
5 | true | success | success | success | success
6 | true | success | success | success | success
7 | true | success | success | success | success
8 | true | success | success | success | success
9 | true | success | success | success | success
10 | true | success | success | success | success
11 | true | success | success | success | success
12 | true | success | success | success | success
13 | true | success | success | success | success
14 | true | success | success | success | success
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]