Yicheng Qin
5a9c2851a7
etcdmain: var log -> plog
...
So the variable name doesn't mess up with standard package name.
2015-06-10 16:19:06 -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
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
Xiang Li
627929d2f4
Merge pull request #2909 from xiang90/logger
...
*: rename logger to plog
2015-06-02 15:03:28 -07:00
Xiang Li
711451ce2d
*: rename logger to plog
2015-06-02 14:58:24 -07:00
Xiang Li
28878e34ff
Merge pull request #2903 from xiang90/chord_rafthttp
...
rafhttp: clean up logging messages
2015-06-02 14:44:40 -07:00
Yicheng Qin
b74082c06c
Merge pull request #2889 from yichengq/version-runtime-enforce
...
rafthttp: version enforcement on rafthttp messages
2015-06-02 14:37:38 -07:00
Yicheng Qin
c371d8c65c
rafthttp: version enforcement on rafthttp messages
...
This PR sets etcd version and min cluster version in request header,
and let server check version compatibility. rafthttp server
will reject any message from peer with incompatible version(too low
version or too high version), and print out warning logs.
2015-06-02 13:33:18 -07:00
Xiang Li
2bf64b4adf
Merge pull request #2898 from xiang90/raft_log
...
raft use leveled logger
2015-06-02 13:04:02 -07:00
Xiang Li
1561b85bf3
raft: drop the raft prefix in logging
2015-06-02 12:50:42 -07:00