dcapwell commented on code in PR #57:
URL: https://github.com/apache/cassandra-accord/pull/57#discussion_r1301997217
##########
accord-core/src/main/java/accord/local/Node.java:
##########
@@ -172,7 +172,10 @@ public Node(Id id, MessageSink messageSink,
ConfigurationService configService,
// TODO (cleanup, testing): remove, only used by Maelstrom
public AsyncResult<Void> start()
{
- return onTopologyUpdateInternal(configService.currentTopology(),
false).metadata;
+ EpochReady ready =
onTopologyUpdateInternal(configService.currentTopology(), false);
+ ready.coordination.addCallback(() ->
this.topology.onEpochSyncComplete(id, topology.epoch()));
+ configService.acknowledgeEpoch(ready);
Review Comment:
> Should we be doing this on every node start?
so, the code documents that this is for maelstrom and is used in burn test,
but is not used in C*... so I am treading it as a test method. The main reason
is that we need to know the state before we start, and the fact a epoch=1
exists is more a product of our test infra than a real impl.
> If this is only used for test purposes, perhaps we should extend Node for
testing
I have 0 issue with a `TestNode` that adds this for maelstrom / burn test
> But if we start simulating node stop/start I'm not sure if this makes
sense for testing either.
I can sync with @iamaleksey on this issue so he can flesh this out with his
work. In C* we have a store of what replies we have seen and what are
in-flight, so on restart we know what subset to pick form; in accord-core
main/test we don't as everything is in-memory so we need to simulate that. If
we are implementing start/stop we need to flesh that out, so feel it would be
best to leave there.
--
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]