Anthony Romano
2f1542c06d
*: use filepath.Join for files
2017-03-16 07:46:06 -07:00
Xiang Li
ab0ccdc4df
snap: fix write snap
...
Do not use writeFile since it does not sync file before closing.
This can lead to slient file corruption when disk is full.
2016-06-02 07:38:48 -07:00
Gyu-Ho Lee
ef44f71da9
*: update LICENSE header
2016-05-12 20:51:48 -07:00
Ajit Yagaty
c12f263577
snap: Do not complain about db file.
...
Currently the snapshotter throws a warning if a file without the
.snap suffix is found. Fix it to allow known files to exist in
the snap folder.
2016-04-03 17:28:04 -07:00
Anthony Romano
bd832e5b0a
*: migrate Godeps to vendor/
2016-03-22 17:10:28 -07:00
Gyu-Ho Lee
81229dbea9
*: add missing package descriptions
...
This adds and updates package descriptions in etcd projects.
And also deletes some duplicate LICENSE statements.
2015-11-17 20:54:10 -08:00
Xiang Li
c1e4e647eb
snap: use Histogram for snap metrics
2015-10-17 12:57:18 -07:00
Hitoshi Mitake
7a6d33620f
snap: export durations of marshalling cost during snapshot save
...
Currently, total duration of snapshot saving is exported for
prometheus. For more detailed analysis, this commit let etcd export
durations of marshalling for prometheus.
2015-08-20 12:47:07 +09:00
Alex Robinson
57a5520157
snap: Record the snapshot save duration on success rather than only on error.
...
It makes more sense to record the latency of successes (or all attempts)
than of only a particular failure case.
2015-07-16 10:46:47 -07:00
Xiang Li
13f44e4b79
*: update generated proto code
2015-06-29 16:45:25 -07:00
Xiang Li
711451ce2d
*: rename logger to plog
2015-06-02 14:58:24 -07:00
Xiang Li
ae5f7c943b
snap: use leveled logger
2015-06-01 14:07: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
Xiang Li
c3d3ad931b
snap: add save latency metrics
2015-02-28 11:16:42 -08:00
Xiang Li
71bed48916
snap: add Read function
2015-02-11 10:21:19 -08: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
Veres Lajos
3de2ab2c04
*: typofixes
...
https://github.com/vlajos/misspell_fixer
2014-12-04 22:51:19 +00: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
Yicheng Qin
791b2fd503
*: handle panic and fatal more consistently
...
1. etcd fatals if there is critical error in the system and operator should
do something for it
2. etcd panics if there happens something unexpected, and it should be
reported to us to debug.
2014-11-05 13:53:24 -08:00
Yicheng Qin
5da481213e
Merge pull request #1478 from unihorn/190
...
etcdserver: panic on storage error
2014-11-03 11:07:55 -08:00
Yicheng Qin
433b4138c5
etcdserver: panic on storage error
...
It is a critical error to etcd, and etcd is not able to recover it now.
2014-11-03 10:46:04 -08:00
Yicheng Qin
aa50af1c69
*: clean log.Print
...
1. only log things by default that the operator of etcd may need to react to
2. put package name at the head of log lines
2014-10-30 18:15:53 -07:00
Jonathan Boulle
7a4d42166b
*: add license header to all source files
2014-10-17 15:41:22 -07: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
f891199ab0
snap: refactoring
2014-09-03 09:20:09 -07:00
Xiang Li
f664c02a40
snap: handle snapshot file error robustly
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
71d12d3330
snap: fix typo
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
f7580cd3b6
snap: fix missing continue
2014-09-03 09:20:09 -07:00
Xiang Li
12a9b84b2b
snap: better naming
2014-09-03 09:20:09 -07:00
Xiang Li
94521738a9
snap: init commit
2014-09-03 09:20:09 -07:00