98 Commits

Author SHA1 Message Date
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
Yicheng Qin
05e591f805 wal: remove unused encoder.buffered func 2015-01-09 14:59:46 -08:00
Yicheng Qin
9bdc343b7c wal: add ReleaseLockTo test 2015-01-09 14:59:41 -08:00
Yicheng Qin
270e67db84 wal: not export unnecessary public functions 2015-01-09 14:55:10 -08:00
Yicheng Qin
50c179ec1c wal: add DetectVersion test 2015-01-09 14:55:05 -08:00
Yicheng Qin
f08d1090d0 wal: refine parseWalName function
According to http://godoc.org/fmt#Scan, if scan number is less than the
number of arguments, err will report why. So we don't need to handle
this error case.
2015-01-08 14:56:21 -08:00
Yicheng Qin
9532810f76 wal: remove unused max function 2015-01-08 14:49:14 -08:00
Yicheng Qin
6460e49a33 wal: save empty snapshot when create
So caller can open at empty snapshot to read all entries.
2015-01-06 19:48:21 -08:00
Yicheng Qin
78bb207bac wal: update doc about snapshot 2015-01-06 19:33:57 -08:00
Yicheng Qin
84f62f21ee wal: record and check snapshot 2015-01-06 16:27:40 -08:00
Jonathan Boulle
1ec98cb795 pkg/fileutil: sort filenames during ReadDir 2014-12-18 16:36:11 -08:00
Xiang Li
502396edd5 wal: fix wal doc 2014-12-14 19:36:37 -08:00
Xiang Li
53bf7e4b5e wal: rename openAtIndex -> open; OpenAtIndexUntilUsing -> openNotInUse 2014-12-14 19:33:06 -08:00
Xiang Li
f538cba272 *: do not backup files still in use 2014-12-14 19:27:22 -08:00
Xiang Li
ea94d19147 *: lock the in using files; do not purge locked the wal files 2014-12-14 19:27:22 -08:00
Barak Michener
cf7690cb51 detect more cases of empty directories and actual errors 2014-12-11 13:37:32 -05:00
Barak Michener
421fe128c3 Return Unknown instead of NotExist
Unless the data dir truly does not exist.
2014-12-11 13:09:50 -05:00
Yicheng Qin
b9bf957c6d wal: sync after writing data to disk in Cut function 2014-12-04 22:56:34 -08:00
Yicheng Qin
af0f34c595 wal: save latest state into new WAL
So we could always read out state when open at valid index.
2014-12-04 12:19:21 -08:00
Yicheng Qin
aa61009560 wal: not return ErrIndexNotFound in ReadAll
This IndexNotFound case is reasonable now because we don't write dummy
entries into wals any more.
2014-12-02 00:28:54 -08:00
Xiang Li
d3db010190 *: support purging old wal/snap files 2014-12-01 11:50:17 -08:00
Barak Michener
5139257b8d Merge pull request #1743 from barakmich/auto_upgrade
etcdserver: autodetect v0.4 WALs and upgrade them to v0.5 automatically
2014-11-20 17:20:34 -05:00
Barak Michener
59a0c64e9f fix import loop, add set to types, and fix comments 2014-11-20 15:38:08 -05:00
Barak Michener
78ea3335bf etcdserver: autodetect v0.4 WALs and upgrade them to v0.5 automatically 2014-11-20 15:38:08 -05:00
Xiang Li
d0dd205b0e wal: add a bench for write entry 2014-11-20 12:07:17 -08:00
Jonathan Boulle
5a964f49a5 wal: propagate errors 2014-11-08 17:16:23 -08: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
Xiang Li
075ab6415f Merge pull request #1587 from xiangli-cmu/fix_wal
wal: sync before returning from create
2014-11-03 15:58:47 -08:00
Xiang Li
ff1f5a9d57 wal: sync before returning from create 2014-11-03 14:28:59 -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
Brandon Philips
513c72ec8b wal: update the docs to show the optional metadata field 2014-10-31 11:32:17 -07: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
f98fbbfc14 *: proto refactoring 2014-10-14 21:07:23 +08:00
Jonathan Boulle
4183b69e12 *: move from third_party to Godep 2014-10-14 00:37:52 -07:00
Yicheng Qin
447caf1afc etcdserver/wal: record info at the head of WAL file 2014-10-10 11:57:09 -07:00
Xiang Li
8bbbaa88b2 *: raft related int64 -> uint64 2014-10-09 14:29:21 +08:00
Yicheng Qin
1d5d2e3726 *: Id -> ID for protobuf types
We use ID instead of Id in this project based on golang conventions.
2014-09-26 11:49:30 -07:00
Xiang Li
2f6086de22 pkg: move /crc to /pkg/crc 2014-09-25 10:50:33 -07:00
Jonathan Boulle
c8c55aa378 scripts: consolidate and standardize protobuf generation 2014-09-24 13:45:00 -07:00
Jonathan Boulle
cf4af47f7e wal: remove logging messages
These are noisy and unhelpful by default. We can re-add if at some point
we reintroduce debugging/multiple log levels.
2014-09-22 19:08:47 -07:00
Yicheng Qin
df70f653a4 Merge pull request #1099 from unihorn/128
wal: OpenFromIndex fails if it cannot find previous index
2014-09-17 16:00:51 -07:00
Yicheng Qin
29f6d8a9e6 wal: add ErrFileNotFound and ErrIndexNotFound 2014-09-17 15:58:06 -07:00
Yicheng Qin
7160b5ae26 wal: OpenFromIndex fails if it cannot find previous index
Example:
We save entry 1, 2, 3 to WAL.
If we try to open 100, it should fail.
2014-09-17 15:07:07 -07:00
Xiang Li
ab61a8aa9a *: init for on disk snap support 2014-09-17 13:56:12 -07:00
Yicheng Qin
de21c39ca5 raft: isStateEqual -> isHardStateEqual, IsEmptyState -> IsEmptyHardState 2014-09-16 13:55:00 -07:00
Yicheng Qin
023dc7cba2 etcdserver: add SYNC request 2014-09-16 13:42:03 -07:00
Xiang Li
69f2d5c590 wal: refactor 2014-09-15 10:35:36 -07:00
Xiang Li
77fbd2610c wal: add comment 2014-09-15 10:17:21 -07:00