Skip to content

CASSANDRA-21584 Fix topology related test failures for Accord - #289

Open
alanwang67 wants to merge 6 commits into
apache:trunkfrom
alanwang67:topologyTestFails
Open

CASSANDRA-21584 Fix topology related test failures for Accord#289
alanwang67 wants to merge 6 commits into
apache:trunkfrom
alanwang67:topologyTestFails

Conversation

@alanwang67

@alanwang67 alanwang67 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Fixes tests

  • TopologyChangeTest.lostBarrierTest
  • TopologyChangeTest.lateBarrierTest
  • TopologyTest.basic

getUncheckedTimeout(node.topology().await(2, null), 5, TimeUnit.SECONDS);
MockTopologyService topologyService = (MockTopologyService) node.topology().topologyService();
getUncheckedTimeout(topologyService.ackFor(2).coordinate, 5, TimeUnit.SECONDS);
assertEpochRejection(node, keys, 1, false); // shouldn't have received the sync point preaccept

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Speaking to Alan in slack he is saying that Node.send allows not sending the message to the local node and directly handle it, but when i disable that logic the test unchanged still fails the same way; so it sounds like the foundational assumption about the patch is off.

Also this assert is validating we reject so by removing the assert the test really isn't checking that anymore? so what is the test doing if we remove these asserts? feels out of place and the assumption that its based off doesn't seem to be true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is the patch i ran the test with

diff --git a/accord-core/src/main/java/accord/local/Node.java b/accord-core/src/main/java/accord/local/Node.java
index 785fe9c7..1143835b 100644
--- a/accord-core/src/main/java/accord/local/Node.java
+++ b/accord-core/src/main/java/accord/local/Node.java
@@ -573,16 +573,18 @@ public class Node implements NodeCommandStoreService
     public <T extends Reply> Cancellable send(Id to, Request send, @Nonnull AsyncExecutor executor, Callback<T> callback, @Nullable Tracing tracing)
     {
         maybeTraceRemote(to, send, tracing);
-        if (permitLocalDelivery() && to.equals(id)) return new LocalDelivery<>(this, callback).deliver(send);
-        else return messageSink.send(to, send, executor, callback);
+        return messageSink.send(to, send, executor, callback);
+        //if (permitLocalDelivery() && to.equals(id)) return new LocalDelivery<>(this, callback).deliver(send);
+        //else return messageSink.send(to, send, executor, callback);
     }
 
     // send to a specific node
     public void send(Id to, Request send, @Nullable Tracing tracing)
     {
         maybeTrace(to, send, tracing);
-        if (to.equals(id)) send.process(this, to, new NoReplyContext(this, send));
-        else messageSink.send(to, send);
+        //if (to.equals(id)) send.process(this, to, new NoReplyContext(this, send));
+        //else messageSink.send(to, send);
+        messageSink.send(to, send);
     }
 
     private void maybeTrace(Node.Id to, Request send, @Nullable Tracing tracing)
@@ -951,4 +953,4 @@ public class Node implements NodeCommandStoreService
         if (replaying) CommandsForKey.disableLinearizabilityViolationsReporting();
         else CommandsForKey.enableLinearizabilityViolationsReporting();
     }
-}
\ No newline at end of file
+}

This reverts commit 7455367.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants