You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when the PaxosStateBridge receives a Paxos decision, it acks the update back to the originating client with a SiriusResult.none() before that update has been persisted or applied to the brain via the RequestHandler. This means there is no way to tell if an exception was thrown while trying to apply it, and there is no way to have a return value from the RequestHandler's enqueuePut or enqueueDelete methods.
Possible solutions:
Delay the ack at least until the update has been run through the RequestHandler, and reply with the return value of handlePut/handleDelete
Change the RequestHandler interface so that enqueuePut/enqueueDelete return a Future<Unit>, to make it clear there is no information being propagated out
The text was updated successfully, but these errors were encountered:
In the course of hacking up a prototype 'tagged' interface, I came up with a workaround for this problem. It is similar to the first suggestion Jon suggested, in that it passes back the handler function return value, but does so by adding a Promise to the request (in the same way as the tag object) and using the return value to complete the Promise. It works, and is easy to understand, but might be violating the actor model by short-circuiting a value directly rather than sending a message.
[On further thought I think this is a dumb idea, not only for the argument raised above but also because I'm not sure Akka wants you to pass 'complex' objects like Promise around]
A quick eyeball of the code suggests that implementing Jon's first suggestion might require nothing more than deleting the line where 'SiriusResult.none' is sent back by the PaxosStateHandler. Is there any reason not to just do that?
Currently, when the
PaxosStateBridge
receives a Paxos decision, it acks the update back to the originating client with aSiriusResult.none()
before that update has been persisted or applied to the brain via theRequestHandler
. This means there is no way to tell if an exception was thrown while trying to apply it, and there is no way to have a return value from theRequestHandler
'senqueuePut
orenqueueDelete
methods.Possible solutions:
RequestHandler
, and reply with the return value ofhandlePut
/handleDelete
RequestHandler
interface so thatenqueuePut
/enqueueDelete
return aFuture<Unit>
, to make it clear there is no information being propagated outThe text was updated successfully, but these errors were encountered: