Skip to content

Rework rollback operations #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hsanjuan opened this issue Oct 26, 2017 · 0 comments
Open

Rework rollback operations #27

hsanjuan opened this issue Oct 26, 2017 · 0 comments
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

Comments

@hsanjuan
Copy link
Collaborator

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#L51

That 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 a State field like the stateOp has.

There should be a way of identifying a stateOp which does not rely on the decoder error-ing. Additonally, stateOp should probably have the State field renamed to avoid any conflicts.

@hsanjuan hsanjuan added 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 labels Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant