2703 Commits

Author SHA1 Message Date
Jonathan Boulle
a7ec09c877 etcdserver/etcdhttp: use empty node for test 2014-09-15 20:34:14 -07:00
Jonathan Boulle
f846c5286a etcdserver/etcdhttp: fix comment, simplify resServer 2014-09-15 19:01:40 -07:00
Jonathan Boulle
27cf7747ea etcdserver/etcdhttp: add tests for serveKeys 2014-09-15 18:33:10 -07:00
Jonathan Boulle
43acdef660 Merge pull request #1086 from jonboulle/serve_raft_test
etcdserver/etcdhttp: add test for serveRaft
2014-09-15 16:13:08 -07:00
Jonathan Boulle
7ac3b32de6 etcdserver: change raft endpoint to send StatusNoContent 2014-09-15 16:10:31 -07:00
Jonathan Boulle
3e2c160eed etcdserver/etcdhttp: add test coverage for serveRaft 2014-09-15 16:07:06 -07:00
Jonathan Boulle
699bc50365 Merge pull request #1071 from jonboulle/serve_mux
etcdserver/etcdhttp: switch to using http.ServeMux
2014-09-15 16:05:58 -07:00
Jonathan Boulle
e04c028d64 etcdserver/etcdhttp: switch to using http.ServeMux 2014-09-15 16:05:20 -07:00
Jonathan Boulle
763c276d27 Merge pull request #1061 from jonboulle/server_interface
etcdserver: introduce Server interface
2014-09-15 15:36:11 -07:00
Jonathan Boulle
8a5ab2ec06 etcdserver: introduce Server interface
This changes etcdserver.Server to an interface, with the former Server
(now "EtcdServer") becoming the canonical/production implementation.
This will facilitate better testing of the http server et al with mock
implementations of the interface.
It also more clearly defines the boundary for users of the Server.
2014-09-15 15:11:01 -07:00
Xiang Li
96624b1129 Merge pull request #1085 from unihorn/127
raft: remove unused raftpb.LastIndex
2014-09-15 15:09:09 -07:00
Jonathan Boulle
35ae488120 Merge pull request #1069 from jonboulle/methods
etcdhttp: check method for every endpoint, add tests
2014-09-15 14:56:47 -07:00
Jonathan Boulle
d9cfc35bed etcdhttp: check method for every endpoint, add tests 2014-09-15 14:56:43 -07:00
Yicheng Qin
cc8d8f2102 raft: remove unused raftpb.LastIndex 2014-09-15 14:34:23 -07:00
Xiang Li
07648f1f25 Merge pull request #1084 from unihorn/126
raft: remove unused return
2014-09-15 13:49:49 -07:00
Yicheng Qin
9607665323 raft: remove unused return 2014-09-15 13:22:21 -07:00
Yicheng Qin
9bf2c2ed9d Merge pull request #1052 from unihorn/121
server: add unit tests
2014-09-15 13:20:50 -07:00
Yicheng Qin
6cd4434ff3 server: add unit tests
Make test coverage >= 90%
2014-09-15 13:16:48 -07:00
Xiang Li
bc5791af11 Merge pull request #1077 from coreos/wal_cut
wal: cut(i uint64) -> cut
2014-09-15 10:37:41 -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
Xiang Li
1d09c25f5f wal: add walName function; cleanup test 2014-09-15 10:17:21 -07:00
Xiang Li
cec1956b8f wal: better comment 2014-09-15 10:14:18 -07:00
Xiang Li
8e0ee1cc5e wal: remove wrong comment for cut 2014-09-15 10:14:18 -07:00
Xiang Li
1164c4b83d wal: recover writting seq 2014-09-15 10:14:18 -07:00
Xiang Li
21860bc017 wal: cut(i uint64) -> cut 2014-09-15 10:14:18 -07:00
Xiang Li
f9c12e2053 Merge pull request #1075 from coreos/fix_heartbeat
raft: fix heartbeat
2014-09-15 10:04:12 -07:00
Yicheng Qin
38c074cb05 Merge pull request #1067 from unihorn/122
raft: write entry 0 into log
2014-09-15 10:00:49 -07:00
Xiang Li
21d116d3e1 raft: fix heartbeat 2014-09-15 09:58:22 -07:00
Yicheng Qin
140fd6d6c4 raft: restart using last written entry also 2014-09-15 09:56:33 -07:00
Yicheng Qin
a9af70c52b raft: write entry 0 into log 2014-09-15 09:55:52 -07:00
Xiang Li
29f9372370 Merge pull request #1080 from coreos/check_id
main: check node id is not noneid
2014-09-14 23:28:39 -07:00
Xiang Li
e7ea6a374a main: check node id is not noneid 2014-09-14 23:28:11 -07:00
Xiang Li
ff7f340bba Merge pull request #1063 from coreos/node_run_test
raft: test node block proposal
2014-09-14 22:46:50 -07:00
Brandon Philips
ed57a7b561 Merge pull request #1079 from philips/fix-procfile-non-zero
Procfile: don't use a 0x0 peer
2014-09-14 22:40:16 -07:00
Brandon Philips
e6e1f2ff7d Procfile: don't use a 0x0 peer
0x0 peer id is no longer valid, don't use it.
2014-09-14 22:39:46 -07:00
Xiang Li
e085cc4e06 Merge pull request #1042 from unihorn/118
raft: set none to be 0
2014-09-14 22:32:37 -07:00
Yicheng Qin
2927cc6e3b raft: refine plus assignment 2014-09-14 22:07:32 -07:00
Xiang Li
03f0ed657a Merge pull request #1076 from coreos/test_race
test: test with race by default
2014-09-14 21:42:45 -07:00
Xiang Li
10c9f7389b test: turn off go 1.2 testing on travis 2014-09-14 21:40:09 -07:00
Xiang Li
e9b790e27b Merge pull request #1078 from unihorn/124
raft: remove unused field
2014-09-14 17:24:51 -07:00
Yicheng Qin
da575c46fa raft: remove unused field 2014-09-14 13:08:35 -07:00
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