CASSANDRA-21584 Fix topology related test failures for Accord - #289
Open
alanwang67 wants to merge 6 commits into
Open
CASSANDRA-21584 Fix topology related test failures for Accord#289alanwang67 wants to merge 6 commits into
alanwang67 wants to merge 6 commits into
Conversation
dcapwell
reviewed
Aug 18, 2026
| 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 |
Contributor
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes tests