Rework rollback operations #27
Labels
exp/novice
Someone with a little familiarity can pick up
help wanted
Seeking public contribution on this issue
P3
Low: Not priority right now
status/ready
Ready to be worked
Currently a rollback is just a forced state-update on the operation log to whatever state the user deems fit.
This is implemented via a
stateOp
which are identified when we try to deserialize a user operation and fail to do so: https://github.com/libp2p/go-libp2p-raft/blob/master/fsm.go#L51That failure relies on a decoder feature (
ErrorIfFieldNotSet
https://github.com/libp2p/go-libp2p-raft/blob/master/codec.go#L44) and assumes that the user-provided operation does not have aState
field like thestateOp
has.There should be a way of identifying a
stateOp
which does not rely on the decoder error-ing. Additonally,stateOp
should probably have theState
field renamed to avoid any conflicts.The text was updated successfully, but these errors were encountered: