> ... between the two starting-ups. It is related to RaftStorage.StartupOption -- the default is FORMAT so the first time can successfully start up. However, it failed to start up the second time since the directory was already formatted. We should use the RECOVER option for the subsequent startups. This change was for https://issues.apache.org/jira/browse/RATIS-1677 .
Sorry for the inconvenience. Tsz-Wo On Tue, Jan 9, 2024 at 4:40 PM tison <[email protected]> wrote: > Hi, > > It's a bit unexpected that startup and shutdown a ratis server with an > empty state machine (extends BaseStateMachine without any override) > returns this error: > > > Failed to FORMAT: One or more existing directories found > > The data under the directory should be compatible between the two > starting-ups. > > You can reproduce it with [1] running EtcdServer's main function twice. > > I don't know why I encountered this exception and if it's a bug or if > I should modify the application logic. > > Best, > tison. > > [1] https://github.com/tisonkun/ratis-etcd >
