FlyDB icon indicating copy to clipboard operation
FlyDB copied to clipboard

Rewrite the fsm component of raft

Open sjcsjc123 opened this issue 2 years ago • 2 comments

  • Apply: Implementing log submission operations for raft clusters
  • Snapshot: Implementing snapshot operations for raft clusters
  • Restore: Implementing storage operations for raft clusters
// fsm implements raft.FSM interface
type fsm struct {
	//implement me
}

func newFSM() raft.FSM {
	return &fsm{}
}

func (f fsm) Apply(log *raft.Log) interface{} {
	//TODO implement me
	panic("implement me")
}

func (f fsm) Snapshot() (raft.FSMSnapshot, error) {
	//TODO implement me
	panic("implement me")
}

func (f fsm) Restore(snapshot io.ReadCloser) error {
	//TODO implement me
	panic("implement me")
}

sjcsjc123 avatar Jul 09 '23 08:07 sjcsjc123

Do we have the structure of the log.Data?

saeid-a avatar Jul 20 '23 20:07 saeid-a

The initial consideration is to record the information of meta components and corresponding operations. Do you have any ideas?

sjcsjc123 avatar Jul 21 '23 01:07 sjcsjc123