88 Commits

Author SHA1 Message Date
Xiang Li
3fc6f9c24f Merge pull request #1586 from xiangli-cmu/fix_node
*: add Advance interface to raft.Node
2014-11-05 15:09:51 -08:00
Xiang Li
0d7c43d885 *: add a Advance interface to raft.Node
Node set the applied to committed right after it sends out Ready to application. This is not
correct since the application has not actually applied the entries at that point. We add a
Advance interface to Node. Application needs to call Advance to tell raft Node its progress.
Also this change can avoid unnecessary copying when application is still applying entires but
there are more entries to be applied.
2014-11-05 15:04:14 -08:00
Yicheng Qin
866ec5948c etcdhttp/etcdserver: support HEAD on /v2/keys/ namespace 2014-11-04 00:06:49 -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
Jonathan Boulle
55c92ad456 *: create ID type
This creates a simple ID type (wrapped around uint64) to provide for
standard serialization/deserialization to a string (i.e. base 16
encoded). This replaces strutil so now that package is removed.
2014-10-31 10:34:07 -07:00
Brian Waldon
480e92d340 strutil: move IDAsHex/IDFromHex to new pkg 2014-10-27 18:39:09 -07:00
Brian Waldon
2472953939 etcdhttp: hex-encode member ID 2014-10-27 17:25:22 -07:00
Yicheng Qin
ee27846d5b Merge pull request #1422 from unihorn/187
etcdserver: parse context error for better message
2014-10-27 11:00:01 -07:00
Yicheng Qin
e77f8e311c etcdserver: parse context error for better message 2014-10-27 10:59:15 -07:00
Jonathan Boulle
6e6d1897d8 pkg: move everything into subpackages 2014-10-27 09:57:28 -07:00
Xiang Li
009b737cef *: better logging 2014-10-26 08:13:03 -07:00
Yicheng Qin
ea0bff80c0 etcdserver: update member attribute when apply request 2014-10-24 12:43:53 -07:00
Yicheng Qin
89572b5fd7 etcdserver: refactor cluster and clusterStore
Integrate clusterStore into cluster, and let cluster become the source of
cluster info.
2014-10-23 13:27:54 -07:00
Yicheng Qin
5014558b00 etcdserver: clean code 2014-10-22 11:09:36 -07:00
Yicheng Qin
89b032cd69 etcdserver: Member.storeKey -> memberStoreKey 2014-10-22 11:09:36 -07:00
Yicheng Qin
7498234e40 etcdserver: record removed member to check incoming message 2014-10-22 11:09:35 -07:00
Xiang Li
a44849deec Merge pull request #1286 from coreos/clusterid
*: generate clusterid
2014-10-20 19:07:03 -07:00
Jonathan Boulle
b3d5333cb3 *: fix various formatting issues 2014-10-20 17:55:18 -07:00
Yicheng Qin
92230cee63 Merge pull request #1333 from unihorn/172
etcdserver/raft: remove msgDenied, removedNodes, shouldStop
2014-10-20 16:04:09 -07:00
Yicheng Qin
e200d2a8e2 etcdserver/raft: remove msgDenied, removedNodes, shouldStop
The future plan is to do all these in etcdserver level.
2014-10-20 15:13:18 -07:00
Xiang Li
ea6bcacfe4 *: generate clusterid 2014-10-20 15:00:54 -07:00
Yicheng Qin
f7a0d5387b etcdserver: stop server gracefully 2014-10-20 14:43:21 -07:00
Yicheng Qin
058537f34a main: add basic functional test 2014-10-20 14:43:21 -07:00
Jonathan Boulle
7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
Jonathan Boulle
1fa763b47b store: remove unused function 2014-10-17 00:07:23 -07:00
Yicheng Qin
8cd6030a1d etcdserver: add checking when apply conf change 2014-10-16 09:49:26 -07:00
Jonathan Boulle
4183b69e12 *: move from third_party to Godep 2014-10-14 00:37:52 -07:00
Yicheng Qin
f693c6ddf2 etcdserver: apply bootstrap conf change 2014-10-13 11:22:23 -07:00
Yicheng Qin
0319b033ea etcdserver/raft: set context for bootstrap addnode entries 2014-10-13 11:22:23 -07:00
Xiang Li
3516cc3ee5 *: change all ID to uint64 2014-10-12 08:38:48 +08:00
Yicheng Qin
77271b0663 etcdserver: split Member into RaftAttributes and Attributes
The split helps to save them in different key paths, because they have
distinct life cycle on update.
2014-10-09 20:28:00 -07:00
Xiang Li
8bbbaa88b2 *: raft related int64 -> uint64 2014-10-09 14:29:21 +08:00
Yicheng Qin
8e8719f6ac etcdserver: Create, Delete -> Add, Remove 2014-10-07 16:21:58 -07:00
Yicheng Qin
d051af4d3d etcdserver: apply config change on cluster store 2014-10-07 11:04:50 -07:00
Xiang Li
5587e0d73f raft: compact takes index and nodes parameters
Before this commit, compact always compact log at current appliedindex of raft.
This prevents us from doing non-blocking snapshot since we have to make snapshot
and compact atomically. To prepare for non-blocking snapshot, this commit make
compact supports index and nodes parameters. After completing snapshot, the applier
should call compact with the snapshot index and the nodes at snapshot index to do
a compaction at snapsohot index.
2014-10-07 16:03:11 +08:00
Yicheng Qin
45ebfb4217 raft: refine initial entries logic in StartNode 2014-10-06 16:06:01 -07:00
Yicheng Qin
314d425718 main/raft: write addNode ConfChange entries in log when start raft 2014-10-06 14:33:12 -07:00
Jonathan Boulle
1308c3e809 etcdserver: unexport EtcdServer fields where possible 2014-10-03 13:34:56 -07:00
Jonathan Boulle
af6b29f291 main: move server configuration to etcdserver package 2014-10-03 13:34:49 -07:00
Jonathan Boulle
1c11f6a144 *: expose etcd-index in watch requests
This adds a StartIndex field to the Watcher interface, which represents
the Etcd-Index at which the Watcher is created.

Also refactors the HTTP tests to use a table for most handleWatch tests
2014-10-02 18:10:11 -07:00
Yicheng Qin
b64246720b etcdserver: fix test due to rebase 2014-10-01 14:57:39 -07:00
Yicheng Qin
e4a6c9651a raft: add removed
The usage of removed:
1. tell removed node about its removal explicitly using msgDenied
2. prevent removed node disrupt cluster progress by launching leader election

It is set when apply node removal, or receive msgDenied.
2014-10-01 14:57:38 -07:00
Brandon Philips
83137f9eba pkg/types: introduce a URLs type
Cleanup the usage of URLs into its own type so we don't have to use a
FlagValue everywhere we have a list of URLs.
2014-10-01 14:41:01 -07:00
Yicheng Qin
073eb7677d etcdserver: move grep member logic into publish func 2014-10-01 11:50:47 -07:00
Yicheng Qin
a40a270e19 etcdserver: publish self info when start 2014-10-01 11:47:17 -07:00
Yicheng Qin
0e8345aa73 Merge pull request #1143 from unihorn/136
*: Id -> ID for protobuf types
2014-09-29 13:58:02 -07:00
Yicheng Qin
89077167c3 etcdserver: add publish func 2014-09-29 10:13:06 -07: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
Brandon Philips
5e3fd6ee3f etcdserver: introduce the cluster and member
This introduces two new concepts: the cluster and the member.

Members are logical etcd instances that have a name, raft ID, and a list
of peer and client addresses.

A cluster is made up of a list of members.
2014-09-25 18:04:10 -07:00