14 Commits

Author SHA1 Message Date
Yicheng Qin
92cd24d5bd *: fix govet shadow check failure 2015-08-27 14:15:30 -07:00
Xiang Li
f697916793 snap: load should only return ErrNoSnapshot
If there is no available snapshot, load should return
ErrNoSnapshot. etcdserver might recover from that error
if it still have complete WAL files.
2015-04-15 09:41:07 -07:00
Jonathan Boulle
f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Xiang Li
e981dda287 snap: error on empty snapshot 2014-12-08 21:45:28 -08:00
Ben Darnell
355ee4f393 raft: Integrate snapshots into the raft.Storage interface.
Compaction is now treated as an implementation detail of Storage
implementations; Node.Compact() and related functionality have been
removed. Ready.Snapshot is now used only for incoming snapshots.

A return value has been added to ApplyConfChange to allow applications
to track the node information that must be stored in the snapshot.

raftpb.Snapshot has been split into Snapshot and SnapshotMetadata, to
allow the full snapshot data to be read from disk only when needed.

raft.Storage has new methods Snapshot, ApplySnapshot, HardState, and
SetHardState. The Snapshot and HardState parameters have been removed
from RestartNode() and will now be loaded from Storage instead.
The only remaining difference between StartNode and RestartNode is that
the former bootstraps an initial list of Peers.
2014-11-19 16:40:26 -05:00
Jonathan Boulle
7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
Xiang Li
8bbbaa88b2 *: raft related int64 -> uint64 2014-10-09 14:29:21 +08:00
Xiang Li
ab61a8aa9a *: init for on disk snap support 2014-09-17 13:56:12 -07:00
Xiang Li
9e77d180c4 snapshot: move pb to snappb; remove clusterId 2014-09-03 16:33:41 -07:00
Xiang Li
f664c02a40 snap: handle snapshot file error robustly 2014-09-03 09:20:09 -07:00
Xiang Li
338f120cbf snap: check mkdir error in tests 2014-09-03 09:20:09 -07:00
Xiang Li
aff5b75487 snap: separate Load to Load and snapNames 2014-09-03 09:20:09 -07:00
Xiang Li
3b2a90e775 snap: separate different sections in the filename by adding dash 2014-09-03 09:20:09 -07:00
Xiang Li
94521738a9 snap: init commit 2014-09-03 09:20:09 -07:00