Gyuho Lee
03cf9c45f8
etcdserver: fix typo in "adjustTicks"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-13 14:53:51 -07:00
Gyuho Lee
744c73e019
etcdserver: fix "lease_expired_total" metrics
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-10 13:57:17 -07:00
Gyuho Lee
29db853317
etcdserver: replace "hostWhitelist" with "AccessController"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee
509cf414f7
etcdserver: remove duplicate "setAppliedIndex" calls
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-15 19:35:44 -04:00
Gyuho Lee
4f754c1850
etcdserver: clean up with "RaftStatusGetter"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-15 19:30:08 -04:00
Gyuho Lee
9680b8a157
etcdserver: adjust election ticks on restart
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-10 19:09:38 -08:00
Gyuho Lee
78918848bd
etcdserver: support Raft Pre-Vote
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-06 09:55:55 -08:00
Gyuho Lee
3648649277
etcdserver: add "HostWhitelist" to "ServerConfig"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-28 18:25:28 -08:00
Gyuho Lee
8a518b01c4
*: revert "internal/mvcc" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
9b5d6edc4b
*: revert "internal/raftsnap"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
0e12e888e0
*: move "internal/store" to "etcdserver/v2store"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
dd2f3b0de8
*: revert "internal/lease" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
bb95d190c1
*: revert "internal/auth" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
0850ccbf45
*: revert "internal/version" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
0e65660548
*: revert "internal/discovery" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
19010a7182
*: revert "internal/alarm" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
6bbe107225
*: revert "internal/compactor" package change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Xiang
b83244bd35
etcdserver: improve request took too long warning
2018-02-06 12:15:52 -08:00
Gyuho Lee
37546f74ab
*: move "version" to "internal/version"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-29 10:00:20 -08:00
Hitoshi Mitake
6c91766490
*: move "auth" to "internal/auth"
2018-01-29 14:57:35 +09:00
Gyuho Lee
80d15948bc
*: move "mvcc" to "internal/mvcc"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:14:41 -08:00
Gyuho Lee
349a377a67
*: move "lease" to "internal/lease"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:09:29 -08:00
Gyuho Lee
880835c02c
*: move "store" to "internal/store"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:06:22 -08:00
Gyuho Lee
432581c7d0
*: move "discovery" to "internal/discovery"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-25 15:41:17 -08:00
Gyuho Lee
46b9844ca5
*: move "alarm,compactor" to "internal/*"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-25 15:26:21 -08:00
Gyuho Lee
dee39bf786
internal/raftsnap: move "raftsnap" to internal
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 10:36:04 -08:00
Gyuho Lee
6a70a931d3
etcdserver: rename "snap" to "raftsnap" package
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 10:26:07 -08:00
dvonthenen
25cdf4ed92
*: expose Raft Applied Index through to "etcdctl endpoint status"
...
Fixed based on feedback
Fixed spacing
Fix gofmt
2018-01-22 07:37:21 -08:00
Gyuho Lee
85af65eca9
etcdserver: log lease revoke error
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-14 21:45:20 -08:00
Gyu-Ho Lee
f65aee0759
*: replace 'golang.org/x/net/context' with 'context'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Anthony Romano
758c3c09fd
etcdserver: refactor v2 request processing
...
Makes interfaces more reusable.
2017-08-31 11:47:40 -07:00
Anthony Romano
1d3afd4bb5
etcdhttp, v2http, etcdserver: use etcdserver.{Server,ServerV2} interfaces
2017-08-31 11:47:40 -07:00
Anthony Romano
31381da53a
etcdserver: raise alarm on cluster corruption
...
Fixes #7125
2017-08-22 09:59:59 -07:00
Anthony Romano
478ba2c4f2
etcdserver: consolidate error checking for v3_server functions
...
Duplicated error checking code moved into raftRequest/raftRequestOnce.
2017-07-25 14:28:39 -07:00
Gyu-Ho Lee
61a736a068
etcdserver: check alarms in health handler
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-18 15:51:28 -07:00
Gyu-Ho Lee
403ba1dfa7
etcdserver: expose 'transferLeadership' as 'MoveLeader'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-23 12:51:28 -07:00
Xiang Li
0fe8fdcb29
Merge pull request #8123 from yudai/revision_compactor
...
Compactor: Add Revisional compactor
2017-06-22 16:34:28 -07:00
Iwasaki Yudai
a3f8f47422
*: add Revision compactor
2017-06-21 15:41:07 -07:00
Anthony Romano
6ed51dc621
etcdserver, v3rpc: support nested txns
2017-06-21 14:33:15 -07:00
Anthony Romano
dcf52bbfac
etcdserver, embed, integration: don't use pointer for ServerConfig
...
ServerConfig is owned by etdcserver and unshared, so don't pass or store by
pointer. Also removes duplicated field 'snapCount'.
2017-06-15 13:02:13 -07:00
Gyu-Ho Lee
45fd8279f0
etcdserver: add leaseExpired debugging metrics
...
Fix https://github.com/coreos/etcd/issues/8050 .
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-08 10:36:25 -07:00
Hitoshi Mitake
0c655902f2
auth, etcdserver: protect revoking lease with auth
...
Currently clients can revoke any lease without permission. This commit
lets etcdserver protect revoking with write permission.
This commit adds a mechanism for generating internal token. It is used
for indicating that LeaseRevoke was issued internally so it should be
able to delete any attached keys.
2017-06-07 17:46:14 -07:00
Anthony Romano
887db5a3db
*: fix go tool vet -all -shadow errors
2017-06-03 21:32:36 -07:00
Anthony Romano
a20e667c5b
Merge pull request #7967 from heyitsanthony/purge-snapdb
...
etcdserver: purge old snap.db files
2017-05-30 16:15:11 -07:00
fanmin shi
9e7740011b
etcdserver: add --max-request-bytes flag
2017-05-25 11:01:38 -07:00
Anthony Romano
c1c9a2c96c
etcdserver: close mvcc.KV on init error path
...
Scheduled compaction will panic if KV is not stopped before
closing the backend.
2017-05-23 10:41:37 -07:00
Anthony Romano
ab16fa1f07
etcdserver: purge old snap.db files
...
Lots of garbage db files in #7957 . Should purge.
2017-05-22 15:44:21 -07:00
Anthony Romano
f6cd4d4f5b
snap, etcdserver: tighten up snapshot path handling
...
Computing the snapshot file path is error prone; snapshot recovery was
constructing file paths missing a path separator so the snapshot
would never be loaded. Instead, refactor the backend path handling
to use helper functions where possible.
2017-05-11 13:46:59 -07:00
fanmin shi
8b7b7222dd
etcdserver: renaming db happens after snapshot persists to wal and snap files
...
In the case that follower recieves a snapshot from leader
and crashes before renaming xxx.snap.db to db but after
snapshot has persisted to .wal and .snap, restarting
follower results loading old db, new .wal, and new .snap.
This will causes a index mismatch between snap metadata index
and consistent index from db.
This pr forces an ordering where saving/renaming db must
happen after snapshot is persisted to wal and snap file.
this guarantees wal and snap files are newer than db.
on server restart, etcd server checks if snap index > db consistent index.
if yes, etcd server attempts to load xxx.snap.db where xxx=snap index
if there is any and panic other wise.
FIXES #7628
2017-05-09 14:00:12 -07:00
fanmin shi
5533c3058a
etcdserver: apply() sets consistIndex for any entry type
...
previously, apply() doesn't set consistIndex for EntryConfChange type.
this causes a misalignment between consistIndex and applied index
where EntryConfChange entry results setting applied index but not consistIndex.
suppose that addMember() is called and leader reflects that change.
1. applied index and consistIndex is now misaligned.
2. a new follower node joined.
3. leader sends the snapshot to follower
where the applied index is the snapshot metadata index.
4. follower node saves the snapshot and database(includes consistIndex) from leader.
5. restarting follower loads snapshot and database.
6. follower checks snapshot metadata index(same as applied index) and database consistIndex,
finds them don't match, and then panic.
FIXES #7834
2017-05-02 14:57:36 -07:00