Yicheng Qin
29dca49cb5
rafthttp: wait 1ms before enabling cancel
...
CancelRequest only effects on in-flight request, so we need to wait
for Do(request) called before enabling cancel.
2015-06-12 07:55:06 -07:00
Yicheng Qin
cd629c9b44
Merge pull request #2939 from yichengq/fix-update-attr
...
etcdserver: allow to update attributes of removed member
2015-06-10 16:53:39 -07:00
Yicheng Qin
8725e69cf7
etcdserver: allow to update attributes of removed member
...
There exist the possiblity to update attributes of removed member in
reasonable workflow:
1. start member A
2. leader receives the proposal to remove member A
2. member A sends the proposal of update its attribute to the leader
3. leader commits the two proposals
So etcdserver should allow to update attributes of removed member.
2015-06-10 16:52:18 -07:00
Xiang Li
743ac73b11
Merge pull request #2954 from xiang90/fix_test
...
proxy: fix test
2015-06-10 16:44:58 -07:00
Yicheng Qin
ed1c5a73d1
Merge pull request #2951 from yichengq/fix-proxy-acurls
...
etcdmain: fix that advertise-client-urls is required in proxy mode
2015-06-10 16:42:06 -07:00
Xiang Li
612ecbc89d
proxy: fix test
2015-06-10 16:31:42 -07:00
Yicheng Qin
cf7c83b304
etcdmain: fix that advertise-client-urls is required in proxy mode
...
etcd proxy doesn't need to set advertise-client-urls because the flag is
not used.
2015-06-10 16:22:32 -07:00
Yicheng Qin
0a3a2720a1
Merge pull request #2923 from yichengq/rafthttp-status
...
rafthttp: pretty print connection error
2015-06-10 16:17:07 -07:00
Xiang Li
f64a8214f7
Merge pull request #2952 from xiang90/fileutil
...
fileutil: use leveled logging
2015-06-10 16:01:24 -07:00
Xiang Li
dc87454487
fileutil: return on error and send it to error chan
2015-06-10 15:59:24 -07:00
Xiang Li
e2c2f098bc
fileutil: use leveled logging
2015-06-10 15:57:59 -07:00
Yicheng Qin
d92c89516b
rafthttp: fix capnslog package name
2015-06-10 15:43:54 -07:00
Yicheng Qin
1dbe72bb74
rafthttp: pretty print connection error
...
1. print out the status change of connection with peer
2. only print the first error for repeated ones
2015-06-10 15:43:49 -07:00
Yicheng Qin
30db41e031
Procfile: use -listen-client-urls instead of -bind-addr
...
-bind-addr is etcd 0.4 flag, and we should deprecate it.
Moreover, this makes Procfile fit the workflow we mention in the doc,
which helps ourselves find the problem first.
2015-06-10 15:13:33 -07:00
Xiang Li
37f9534109
Merge pull request #2950 from xiang90/test_cpu
...
test: run with cpu = 1,2,4
2015-06-10 15:09:45 -07:00
Yicheng Qin
4e79abcfeb
Merge pull request #2944 from yichengq/fix-2procs
...
pkg/testutil: ForceGosched -> WaitSchedule
2015-06-10 14:44:32 -07:00
Yicheng Qin
018fb8e6d9
pkg/testutil: ForceGosched -> WaitSchedule
...
ForceGosched() performs bad when GOMAXPROCS>1. When GOMAXPROCS=1, it
could promise that other goroutines run long enough
because it always yield the processor to other goroutines. But it cannot
yield processor to goroutine running on other processors. So when
GOMAXPROCS>1, the yield may finish when goroutine on the other
processor just runs for little time.
Here is a test to confirm the case:
```
package main
import (
"fmt"
"runtime"
"testing"
)
func ForceGosched() {
// possibility enough to sched up to 10 go routines.
for i := 0; i < 10000; i++ {
runtime.Gosched()
}
}
var d int
func loop(c chan struct{}) {
for {
select {
case <-c:
for i := 0; i < 1000; i++ {
fmt.Sprintf("come to time %d", i)
}
d++
}
}
}
func TestLoop(t *testing.T) {
c := make(chan struct{}, 1)
go loop(c)
c <- struct{}{}
ForceGosched()
if d != 1 {
t.Fatal("d is not incremented")
}
}
```
`go test -v -race` runs well, but `GOMAXPROCS=2 go test -v -race` fails.
Change the functionality to waiting for schedule to happen.
2015-06-10 14:37:41 -07:00
Xiang Li
2d21904cfd
test: run with cpu = 1,2,4
2015-06-10 14:26:17 -07:00
Xiang Li
97709b202d
Merge pull request #2930 from xiang90/storage_restore
...
storage: initial snapshot and restore
2015-06-10 11:38:57 -07:00
Xiang Li
ba9a46aa02
storage: initial snapshot and restore
...
Snapshot takes an io.Writer and writes the entire backend data to
the given writer. Snapshot writes a consistent view and does not
block other storage operations.
Restore restores the in-memory states (index and book keeping) of
the storage from the backend data.
2015-06-10 11:32:10 -07:00
Yicheng Qin
1403783326
Merge pull request #2911 from yichengq/rafthttp-plog
...
rafthttp: use leveled logger
2015-06-09 16:16:33 -07:00
Yicheng Qin
f1e995b070
rafthttp: use leveled logger
2015-06-09 16:15:02 -07:00
Xiang Li
19ef3a0982
Merge pull request #2934 from xiang90/etcdserver_log
...
etcdserver: use leveled logging
2015-06-09 15:53:52 -07:00
Xiang Li
e0f9796653
etcdserver: use leveled logging
...
Leveled logging for etcdserver pkg.
2015-06-09 13:53:07 -07:00
Yicheng Qin
9fbd2599ad
Merge pull request #2940 from yichengq/improve-raft-loop
...
etcdserver: stop raft loop when receiving stop signal
2015-06-09 11:24:53 -07:00
Yicheng Qin
0814966ca2
etcdserver: stop raft loop when receiving stop signal
...
When it waits for apply to be done, it should stop the loop if it
receives stop signal.
This helps to print out panic information. Before this PR, if the panic
happens when server loop is applying entries, server loop will wait for
raft loop to stop forever.
2015-06-09 11:11:53 -07:00
Xiang Li
ebb767765e
Merge pull request #2941 from bakins/http-log
...
Simple debug HTTP request logging
2015-06-09 10:52:13 -07:00
Brian Akins
d8a836e618
Simple debug HTTP request logging
2015-06-09 13:40:37 -04:00
Xiang Li
1ff86556b7
Merge pull request #2937 from xiang90/http_log
...
etcdhttp: use leveled logging
2015-06-09 09:35:17 -07:00
Xiang Li
0adeee2965
etcdhttp: use leveled logging
2015-06-09 09:26:57 -07:00
Xiang Li
3390f38bba
Merge pull request #2925 from yichengq/doc-gomaxprocs
...
docs: document cpu cores deployment
2015-06-08 13:49:28 -07:00
Yicheng Qin
471cf82905
docs: document maximal OS threads
2015-06-08 12:00:33 -07:00
Xiang Li
e0d5116683
Merge pull request #2926 from xiang90/raft_log
...
raft: make the repeated log message under bad path debug level
2015-06-08 10:57:12 -07:00
Xiang Li
1279e495f0
raft: make the repeated log message under bad path debug level
2015-06-05 17:29:24 -07:00
Xiang Li
05b55d9d75
Merge pull request #2921 from xiang90/fix_watch_cancel
...
client: fix cancel watch
2015-06-05 15:46:16 -07:00
Xiang Li
15ac4f08f8
client: fix cancel watch
...
ioutil.ReadAll is a blocking call, we need to wait cancelation
during the call.
2015-06-05 15:40:43 -07:00
Xiang Li
976ac65c86
Merge pull request #2894 from xiang90/refactor_keyIndex
...
Storage initial compaction
2015-06-05 12:38:11 -07:00
Xiang Li
511f323424
Merge pull request #2916 from luan/build-script-git-fallback
...
Unexpected dependency in build script
2015-06-05 10:17:15 -07:00
Connor and Luan Santos
17d5381059
build: default git sha to GitNotFound in case git fails
2015-06-05 10:09:50 -07:00
Xiang Li
f47ed4a364
storage: initial compact
2015-06-05 09:22:44 -07:00
Jonathan Boulle
60ca9ebab1
Merge pull request #2915 from jonboulle/master
...
docs: readme/branch-management cleanup
2015-06-04 16:54:15 -07:00
Jonathan Boulle
048a948eca
docs: readme/branch-management cleanup
2015-06-04 16:41:32 -07:00
Xiang Li
75ddf05ca1
Merge pull request #2910 from xiang90/etcdctl
...
etcdctl: cleanup
2015-06-03 10:53:13 -07:00
Xiang Li
f9c67daee5
Merge pull request #2912 from xiang90/client-curl
...
client: support printing cURL command
2015-06-03 10:15:00 -07:00
Xiang Li
4f2df84a38
client: support printing cURL command
2015-06-03 10:02:37 -07:00
Yicheng Qin
9e8d589163
Merge pull request #2906 from yichengq/fix-pipeline-stop
...
rafthttp: fix pipeline.stop may block
2015-06-03 08:47:17 -07:00
Xiang Li
f0edf06b6d
etcdctl: minor cleanup
2015-06-02 19:50:37 -07:00
Xiang Li
079e7c10a0
etcdctl: move format to format.go
2015-06-02 19:29:05 -07:00
Xiang Li
26682b663d
etcdctl: cleanup etcdctl exit code
2015-06-02 19:01:41 -07:00
Yicheng Qin
7f8925e172
rafthttp: fix pipeline.stop may block
...
This PR makes pipeline.stop stop quickly. It cancels inflight requests,
and stops sending messages in the buffer.
2015-06-02 17:15:44 -07:00