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
Almost everywhere we call Server.raftApply we have this same code to unpack an error out of the response:
ifrespErr, ok:=resp.(error); ok {
err=respErr
}
This is because FSM errors are reported from ApplyFuture.Response and only raft errors come from ApplyFuture.Error.
In some cases we completely ignore the response from the future, which would result in missing any errors returned by the FSM.Apply. Generally we want to log or return these errors so that the user knows something failed.
By handling the response error in Server.raftApply we can ensure that any error from the apply is always returned in the error response value, and we remove the need to check the response in every caller. We may be able to completely remove the response value, if the only use is unpacking this error.
The text was updated successfully, but these errors were encountered:
Almost everywhere we call
Server.raftApply
we have this same code to unpack an error out of the response:This is because FSM errors are reported from
ApplyFuture.Response
and only raft errors come fromApplyFuture.Error
.In some cases we completely ignore the
response
from the future, which would result in missing any errors returned by theFSM.Apply
. Generally we want to log or return these errors so that the user knows something failed.By handling the response error in
Server.raftApply
we can ensure that any error from the apply is always returned in theerror
response value, and we remove the need to check the response in every caller. We may be able to completely remove the response value, if the only use is unpacking this error.The text was updated successfully, but these errors were encountered: