zk1931 / jzab

ZooKeeper Atomic Broadcast in Java
http://zk1931.github.io/jzab/master/
Apache License 2.0
54 stars 23 forks source link

Make state transfer atomic #200

Closed EasonLiao closed 10 years ago

EasonLiao commented 10 years ago

Create a temporary data directory and store intermediate result there, after the transfering is done, rename this directory to data directory.

The naming of data directory is like : dataN where N is the id of the directory.

EasonLiao commented 10 years ago

@m1ch1 I'm still using SimpleLog since I found a bug in RollingLog when we call sync() in empty log, I'll fix this in separate commit.

EasonLiao commented 10 years ago

fixed the bug