Commit Graph

6389 Commits (c4cbaf5c2a3b12cf44a8d44c8324f8843c7fac3a)

Author SHA1 Message Date
Xiang Li c4cbaf5c2a etcdsever: swap kv pointer atomically 2015-12-10 17:29:36 -08:00
Xiang Li cc6d98bf89 etcdserver: only send snapshot when the member is active 2015-12-10 16:15:26 -08:00
Xiang Li 9df46f9d6f raft: expose RecentActive in Progress 2015-12-10 12:17:18 -08:00
Xiang Li 9b26753dbf Merge pull request #3970 from xiang90/snapshot
*: rewrite snapshot merging and sending for v3
2015-12-10 09:55:42 -08:00
Xiang Li fbcbfc49b8 Merge pull request #3975 from Masterlvng/fix-readme
README: corret Endpoints param
2015-12-10 07:53:20 -08:00
Xiang Li 833c934bd4 Merge pull request #3972 from xiang90/fix_race
store: fix data race when modify event in watchHub.
2015-12-10 07:47:49 -08:00
masterlvng 938333a9fe client/README: correct Endpoints param 2015-12-09 20:49:52 -08:00
Xiang Li b3d9196021 Merge pull request #3973 from xiang90/purge_test
pkg/fileutil: make purge test more reliable
2015-12-09 11:01:47 -08:00
Xiang Li e93c07ba91 pkg/fileutil: make purge test more reliable 2015-12-09 10:34:38 -08:00
Xiang Li d7a027e476 store: fix data race when modify event in watchHub.
The event got from watchHub should be considered as readonly.
To modify it, we first need to get a clone of it or there might
be a data race.
2015-12-09 10:11:51 -08:00
Xiang Li 23bd60ccce *: rewrite snapshot sending 2015-12-08 18:21:21 -08:00
Xiang Li 9220a47c30 Merge pull request #3968 from sjpotter/fix-build
remove bash'ism
2015-12-07 21:17:01 -08:00
Shaya Potter 2c2fe7ee8e build: remove bash'ism
[[ is not supported by posix bourne shell so use a substring match that is
2015-12-07 21:05:55 -08:00
Xiang Li 977d3615f7 Merge pull request #3952 from BramGruneir/snapshot
Ensure that Progress is not nil when a MsgSnapStatus comes in
2015-12-07 13:17:46 -08:00
Bram Gruneir 1901a4c718 raft: Ensure that Progress is not nil when a MsgSnapStatus comes in.
This was causing some issues in cockroach cockroachdb/cockroach#2950
2015-12-07 16:01:18 -05:00
Xiang Li 5a4a5998a3 Merge pull request #3960 from gyuho/genproto
storagepb: minor updates from genproto
2015-12-04 16:18:52 -08:00
Gyu-Ho Lee bed6b90e61 storagepb: minor updates from genproto
I ran genproto with the most recent protocol buffer
and it adds one line of missing comment.
2015-12-04 16:16:54 -08:00
Xiang Li b806e510a9 Merge pull request #3958 from gyuho/build_gotip
build: parse go version at go tip
2015-12-04 13:18:07 -08:00
Gyu-Ho Lee 0473cb93ac build: parse go version at go tip
This parses go version when build is running
in moast recent go master branch.
2015-12-04 13:08:19 -08:00
Xiang Li 127b529582 Merge pull request #3959 from xiang90/fix_storage_test
storage: make RestoreContinueUnfinishedCompaction more reliable
2015-12-04 13:03:29 -08:00
Xiang Li a0eca5fd37 storage: make RestoreContinueUnfinishedCompaction more reliable 2015-12-04 11:48:46 -08:00
Xiang Li e0e80b37f2 Merge pull request #3957 from gyuho/travis_matrix
travis, test: allow failures with gotip
2015-12-04 11:33:35 -08:00
Gyu-Ho Lee bbdd3c5f0e travis, test: allow failures with gotip
This allows tests to fail with Go tip, because go tip branch might not be
stable. This replaces https://github.com/coreos/etcd/pull/3953.
2015-12-04 11:16:59 -08:00
Xiang Li 769f874542 Merge pull request #3956 from mitake/test-gofmt
test: print diff with gofmt
2015-12-03 17:22:14 -08:00
Hitoshi Mitake 7094c78dcd test: print diff with gofmt
Current test doesn't pass -d option to gofmt. Let's pass the option
for easy fix.

Example output:
Checking gofmt...
gofmt checking failed:
client/client.go
diff client/client.go gofmt/client/client.go
--- /tmp/gofmt741496847 2015-12-04 10:11:11.340651702 +0900
+++ /tmp/gofmt265273890 2015-12-04 10:11:11.340651702 +0900
@@ -41,7 +41,7 @@

 var DefaultTransport CancelableTransport = &http.Transport{
        Proxy: http.ProxyFromEnvironment,
-       Dial:(&net.Dialer{
+       Dial: (&net.Dialer{
                Timeout:   30 * time.Second,
                KeepAlive: 30 * time.Second,
        }).Dial,
@@ -265,7 +265,7 @@
                        return ErrNoEndpoints
                }

-               for i, _ := range c.endpoints {
+               for i := range c.endpoints {
                        if c.endpoints[i].String() == lu.String() {
                                c.pinned = i
                                break
2015-12-04 10:12:05 +09:00
Xiang Li 8d4073d078 Merge pull request #3945 from xiang90/new_watch_bench
tools/benchmark: add watch subcommand.
2015-12-03 16:56:02 -08:00
Xiang Li c6430b3292 tools/benchmark: add watch subcommand.
Watch command run benchmark tests for watch releated operations:
1. watch keys 2. sending events to watchers.

To test 2, this test also puts keys into etcd cluster to trigger
event sending.

Besides the benchmark results showed at client side, the tester
can also monitor the server-side mem/cpu usage and also check
the metrics of slow watchers. If there are a lot of slow watchers,
it means etcd server is over-loaded by watchers.
2015-12-03 15:56:17 -08:00
Xiang Li 7f534fd503 Merge pull request #3951 from gyuho/travis
travis: add Go tip for testing
2015-12-03 14:39:51 -08:00
Gyu-Ho Lee 8e2c430f52 travis: add Go tip for testing
It would be good to test etcd with the latest Go branch,
so that we can find bugs either in Go or etcd in advance.

Reference:
https://docs.travis-ci.com/user/languages/go
2015-12-03 14:36:35 -08:00
Xiang Li 4e5f20de3b Merge pull request #3948 from xiang90/refactor
etcdserver: refactor a for loop in recvSnap test
2015-12-02 15:45:19 -08:00
Xiang Li 0708a5e50d etcdserver: refactor a for loop in recvSnap test 2015-12-02 15:41:03 -08:00
Xiang Li 2696d6960b Merge pull request #3947 from xiang90/fix_purge
pkg/fileutil: make purgeTest more robust
2015-12-02 15:18:11 -08:00
Xiang Li 77069ca16b pkg/fileutil: make purgeTest more robust
1. Add a few comments to the test.

2. Provide a more robust way to check the purging
result. Tolerate slow io operations.
2015-12-02 15:12:42 -08:00
Xiang Li 67ffeee521 Merge pull request #3946 from xiang90/fix_snap_test
etcdserver: get rid of unreliable WaitSchedule
2015-12-02 15:01:20 -08:00
Xiang Li 4dd502dbb3 Merge pull request #3940 from gyuho/add_map_test
storage: add tests for unsafeAddWatching
2015-12-02 14:19:58 -08:00
Gyu-Ho Lee ff2e8b55ae storage: add tests for unsafeAddWatching
This adds map operation tests for unsafeAddWatching, which
could have been failed without https://github.com/coreos/etcd/pull/3939.
It tests if unsafeAddWatching is correctly updating synced map.
2015-12-02 14:18:07 -08:00
Xiang Li 3ec3ffbef0 etcdserver: get rid of unreliable WaitSchedule
In this case, we know we are waiting for an action happened on
storage. We can do a busy wait instead of calling waitSchedule.

The test previously failed on CI with no observed actions.
2015-12-02 13:18:11 -08:00
Xiang Li dd733ca51d Merge pull request #3942 from ngaut/master
v3rpc: Tiny clean up
2015-12-01 21:12:03 -08:00
ngaut e142e073e8 v3rpc: Tiny clean up
unreachable code
2015-12-02 12:30:21 +08:00
Xiang Li 14210cf8a7 Merge pull request #3939 from xiang90/fix_watch
storage: add missing return for unsafeAddWatching
2015-12-01 15:01:30 -08:00
Xiang Li 9f908ce67f storage: add missing return for unsafeAddWatching 2015-12-01 14:55:20 -08:00
Jonathan Boulle 99e80ef60f Merge pull request #3937 from gyuho/proxy_typo
Documentation: minor typo in proxy.md
2015-12-01 09:55:36 -08:00
Xiang Li 93240bd0f0 Merge pull request #3933 from ngaut/fix-shadow-variables
tools: Fix shadow variables and incorrect printing format.
2015-12-01 08:55:22 -08:00
Gyu-Ho Lee 7118363b20 Documentation: minor typo in proxy.md
This fixes a minor typo in proxy.md.
2015-12-01 08:38:37 -08:00
Jonathan Boulle 858857d701 Merge pull request #3936 from joshix/proxydoc-jx
Documentation/proxy: Explain more about Procfile sample.
2015-11-30 16:29:51 -08:00
Josh Wood f30ec0bfea Documentation/proxy: Explain more about Procfile sample.
Say what goreman is so it doesn't confuse.
2015-11-30 16:19:20 -08:00
Josh Wood d8798a0724 Merge pull request #3871 from gyuho/proxy_doc_improve_20151115
Documentation: clarify flag usage for proxy
2015-11-30 16:11:57 -08:00
Xiang Li 27831f022d Merge pull request #3934 from xiang90/new_benchmark_tool
tools: rewrite benchmark tool
2015-11-30 14:32:59 -08:00
Gyu-Ho Lee 367b7325c8 Documentation: clarify flag usage for proxy
This is for coreos#3740. Some users find
`advertise-client-urls` and `initial-cluster` flags confusing to set up a
proxy. This clarifies why we need both flags. And add summary to proxy.md
2015-11-30 14:07:06 -08:00
Xiang Li faff00d19e tools: rewrite benchmark tool 2015-11-30 11:52:43 -08:00