raft: introduce log storage interface.

This change splits the raftLog.entries array into an in-memory
"unstable" list and a pluggable interface for retrieving entries that
have been persisted to disk. An in-memory implementation of this
interface is provided which behaves the same as the old version;
in a future commit etcdserver could replace the MemoryStorage with
one backed by the WAL.
This commit is contained in:
Ben Darnell
2014-11-03 15:04:24 -05:00
parent ac77971f99
commit 25b6590547
16 changed files with 605 additions and 254 deletions

2
test
View File

@@ -39,7 +39,7 @@ split=(${TEST// / })
TEST=${split[@]/#/${REPO_PATH}/}
echo "Running tests..."
go test ${COVER} $@ ${TEST} --race
go test -timeout 10s ${COVER} $@ ${TEST} --race
echo "Checking gofmt..."
fmtRes=$(gofmt -l $FMT)