Closed AbfrmBlr closed 8 years ago
We need to decide if we should still have this method in the API since the replication needs to happen, either way, so that the passive can maintain the global message order. The only thing we could do, in this case, is decide not to run it on the passive. It isn't clear if that special case is really worth keeping. If we believe that it is, then just avoiding the invocation is the way to proceed (immediately sending the acks to the active - potentially just ensuring that the acks are sent when it would have been invoked).
Even if we discount the fact that Ehcache has mutative messages that are irrelevant to the passive (because of the way passive replication works) this still is a useful feature because of "read-only" messages. Seems bizarre that the passive entity has to have a code block that says:
if (message.isReadOnly()) {
return;
}
Yeah, the plan is to honor this. While we were originally hoping that we could use it as an optimization opportunity on the wire, but then realized we couldn't, we can still use it to avoid the logical invocation of these messages, on the passive (since the notion of a read-only message is probably incredibly common).
Back to the original issue filed, are you seeing this with passthrough or the real server implementation or both?
The issue I see is in real server. terracottaPlatformVersion = '5.0.3.beta2'. terracottaApisVersion = '1.0.3.beta' terracottaCoreVersion = '5.0.3-beta' galvanVersion = '1.0.3-beta2'
Improve documentation to reflect default behavior
For the default behavior, passthrough doesnot fails to replicate.
endpoint.beginInvoke().message(message).invoke();
does not replicate for passthrough. It works if the call is made in following way -
endpoint.beginInvoke().message(message).replicate(true).invoke();
If this is purely a passthrough bug and no other API/doc changes are required, it should be tracked there: https://github.com/Terracotta-OSS/tc-passthrough-testing
public InvocationBuilder<M, R> replicate(boolean requiresReplication);
method is not honoured, The messages marked as replicate = false are also getting replicated to passive entity.