Commit Graph

2861 Commits (2e4f725c2b7e264fe6805fefa4261b4b8070b977)

Author SHA1 Message Date
Xiang Li 79b8153eac test: test with race by default 2014-09-14 13:08:14 -07:00
Brian Waldon 1037e7ce55 Merge pull request #1055 from bcwaldon/proxy-monster
proxy mode, pt II
2014-09-12 23:01:24 -07:00
Brian Waldon a155f0bda6 proxy: rewrite stdlib ReverseProxy
The ReverseProxy code from the standard library doesn't actually
give us the control that we want. Pull it down and rip out what
we don't need, adding tests in the process.

All available endpoints are attempted when proxying a request. If a
proxied request fails, the upstream will be considered unavailable
for 5s and no more requests will be proxied to it. After the 5s is
up, the endpoint will be put back to rotation.
2014-09-12 22:56:23 -07:00
Yicheng Qin 54b9c55af3 etcdserver: remove useless sleep
etcdserver.Do will block until there exists leader
2014-09-12 13:01:33 -07:00
Yicheng Qin 34db45a948 raft: set propc, readyc to be nil before run loop 2014-09-12 12:57:50 -07:00
Xiang Li ccee264b7d raft: move defer after run 2014-09-12 12:28:15 -07:00
Xiang Li 45f56a5377 raft: forceGoSched -> forceGosched 2014-09-12 12:27:18 -07:00
Brandon Philips df253a2b14 Merge pull request #1066 from philips/add-raft-doc
add-raft-doc
2014-09-12 12:21:53 -07:00
Xiang Li 5c884c7797 raft: better comment and naming 2014-09-12 12:18:30 -07:00
Xiang Li 0c09862494 raft: add isStateEqual test 2014-09-12 11:59:32 -07:00
Xiang Li f9ef453894 raft: test contain updates 2014-09-12 11:51:25 -07:00
Xiang Li b261a5edc1 raft: test node block proposal 2014-09-12 11:51:25 -07:00
Yicheng Qin 30289dad5c raft: more descriptive panic info 2014-09-12 11:39:53 -07:00
Yicheng Qin 072a21782e Merge pull request #1049 from unihorn/120
raftLog: enhance check in compact
2014-09-12 11:35:41 -07:00
Yicheng Qin d31443f5a3 raftLog: compact applied entries only
compact MUST happen on entries that have been applied, or
1. it may screw up the log by setting wrong commitIndex
2. discard unapplied entries
2014-09-12 11:34:08 -07:00
Yicheng Qin 6edb471d58 Merge pull request #1045 from unihorn/119
wal: change wal filename format
2014-09-12 11:31:46 -07:00
Yicheng Qin 2030ca202f wal: change wal filename format
Make raftIndex section to be expected raftIndex of next entry.

It makes filename more intuitive and straight-forward.

The commit also adds comments for filename format.
2014-09-12 11:24:28 -07:00
Xiang Li 1a0ad54d3e Merge pull request #1059 from coreos/node_test
test node step
2014-09-12 10:23:53 -07:00
Brandon Philips 98f9ee3613 raft: add useful comments
These comments were things I learned about the units, use case or
meaning of various fields and functions in the raft package.
2014-09-12 09:58:04 -07:00
Brandon Philips 58b8610024 raft: add a doc.go file
Explain the package from a high level.
2014-09-12 09:57:48 -07:00
Xiang Li 50c1a34f78 Merge pull request #1060 from jonboulle/peers
etcdserver/etcdhttp: split out peers and add tests
2014-09-11 23:53:54 -07:00
Yicheng Qin 073411f23f raft: remove vote with default value 2014-09-11 23:17:13 -07:00
Yicheng Qin dc1357afa9 raft: use raft helper function in testing 2014-09-11 19:26:29 -07:00
Yicheng Qin 0e0fc2bd24 raft: use [1,n] as address list for raft state machines 2014-09-11 19:23:05 -07:00
Yicheng Qin 84c2bd0b7d raft: set From of local message to be local id 2014-09-11 19:18:47 -07:00
Jonathan Boulle 20776f1947 etcdserver: use int64slice directly 2014-09-11 19:17:07 -07:00
Xiang Li 281afa74ee raft: comments for TestNodeStep 2014-09-11 19:00:40 -07:00
Jonathan Boulle e18b8c12be etcdserver: switch to proper int64Slice for sorting 2014-09-11 17:28:08 -07:00
Xiang Li 81b5967e0a Merge pull request #1054 from philips/add-wal-doc
wal: add a doc file
2014-09-11 17:18:53 -07:00
Xiang Li eb1dcb324c raft: test node step 2014-09-11 17:10:36 -07:00
Jonathan Boulle 5f66b35852 etcdserver/etcdhttp: split out peers and add tests 2014-09-11 16:53:55 -07:00
Jonathan Boulle c03798f99b Merge pull request #1011 from jonboulle/clean_http
Validate HTTP API user input
2014-09-11 15:31:25 -07:00
Jonathan Boulle 786982d8e5 simplify 2014-09-11 15:13:56 -07:00
Jonathan Boulle 52ddd389ff etcdhttp: use Form values over query parameters 2014-09-11 15:12:31 -07:00
Brandon Philips 40341b488c Merge pull request #1058 from philips/grammar-fix
raft: log comment grammar fix
2014-09-11 14:06:33 -07:00
Brandon Philips 3bc4b2db12 raft: log comment grammar fix 2014-09-11 13:59:50 -07:00
Xiang Li f7f65ec464 Merge pull request #1056 from coreos/test
test: test wait pkg
2014-09-11 13:56:51 -07:00
Brandon Philips 884c702512 wal: wal.OpenFromIndex -> wal.OpenAtIndex
The first entry read from the wal should be the index provided. This
name makes that more clear.
2014-09-11 12:52:06 -07:00
Brandon Philips 413b6a59ff wal: add more explanation to wal filename format 2014-09-11 12:51:50 -07:00
Xiang Li 9bd9d88a9d test: sort the pkgs 2014-09-11 12:48:18 -07:00
Xiang Li 0feb153034 test: test wait pkg 2014-09-11 12:38:43 -07:00
Jonathan Boulle 7c03704b19 etcdserver: restructure to hopefully simplify
Obviate parseBool helper, define emptyReq locally to parseRequest,
have writeEvent return an error which gets logged
2014-09-11 08:50:41 -07:00
Brandon Philips 04abd5603f wal: add a doc file 2014-09-10 20:40:20 -07:00
Brandon Philips 71a1c1aa84 Merge pull request #1053 from philips/proxy-in-procfile
Procfile: add a proxy
2014-09-10 18:47:53 -07:00
Brandon Philips 1ee8392a8f Procfile: add a proxy
Woo! Now we have a cluster and a proxy and etcdctl works when running
the procfile by default!
2014-09-10 18:47:32 -07:00
Xiang Li 338ca6050e Merge pull request #1048 from bcwaldon/proxy-monster
proxy mode
2014-09-10 18:09:50 -07:00
Brian Waldon 7415d53020 proxy: add proxy-mode functionality to etcd daemon 2014-09-10 18:06:56 -07:00
Brian Waldon e5a482266f proxy: introduce director
The director class drives an httputil.ReverseProxy. This is used when
etcd is deployed in proxy mode.
2014-09-10 18:04:03 -07:00
Brian Waldon a3334eed23 main: break out startEtcd func 2014-09-10 18:04:02 -07:00
Brian Waldon bafe960dba etcdhttp: add Peers.Endpoints 2014-09-10 18:02:02 -07:00