Commit Graph

6366 Commits (769f874542fecb42877f47a9e9eb5a27df8c1c5a)

Author SHA1 Message Date
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
ngaut 232439191c tools: Fix shadow variables and incorrect printing format. 2015-11-30 20:13:29 +08:00
Xiang Li d705df047b Merge pull request #3922 from gyuho/etcdctlv3_with_cobra
etcdctlv3: use spf13/cobra for cli interface
2015-11-27 14:35:40 -08:00
Xiang Li e8eb3d7744 Merge pull request #3927 from nordligulv/patch-1
client: fix goroutine leak in unreleased context
2015-11-27 10:38:40 -08:00
Andrei Korzhevskii cb9a3e04b1 client: fix goroutine leak in unreleased context
If headerTimeout is not zero then two context are created but only one is released.
cancelCtx in this case is never released which leads to goroutine leak inside it.
2015-11-27 19:44:38 +03:00
Gyu-Ho Lee b7647e0b55 etcdctlv3: use spf13/cobra for cli interface
This replaces codegansta/cli with spf13/cobra base on
this guideline: https://github.com/coreos/docs/blob/master/golang/README.md#cli.
2015-11-26 08:01:09 -08:00
Xiang Li a423a55b14 Merge pull request #3857 from es-chow/remove-multinode-goroutine
raft: add an thread-unsafe Node: RawNode
2015-11-26 07:52:08 -08:00
es-chow 5bc56786dc raft: add RawNode which is a thread-unsafe node without goroutine and remove MultiNode 2015-11-26 17:14:14 +08:00
Gyu-Ho Lee a6bb74e9ff Godeps: add spf13/cobra for etcdctlv3 2015-11-25 14:05:33 -08:00
Jonathan Boulle 27a243c2aa Merge pull request #3923 from gyuho/duplicate_exit
etcdctl: remove duplicate exit line
2015-11-25 09:45:02 -08:00
Gyu-Ho Lee e8215cc577 etcdctl: remove duplicate exit line
`handleError` already exits with the exit code in arguments.
`os.Exit(1)` is never executed in this case.
2015-11-25 09:41:27 -08:00
Xiang Li 0777cda4ea Merge pull request #3921 from barakmich/fix_issue_3920
etcdserver: Fix panic for v3 transaction compares on non-existent keys
2015-11-24 18:35:23 -08:00
Barak Michener 452e5bffc0 etcdserver: Fix panic for v3 transaction compares on non-existent keys
Fixes #3920
2015-11-24 16:49:45 -05:00
Xiang Li 9d7be9ec6f Merge pull request #3917 from xiang90/raft_stepdown
raft: support quorum check when raft is leader
2015-11-24 10:15:01 -08:00
Xiang Li a8cc1570d0 raft: support quorum check when raft is leader
If quorum check fails, the leader will step down to follower.
2015-11-24 09:36:37 -08:00
Yicheng Qin 2762e1f3f7 Merge pull request #3918 from gyuho/V3Procfile
V3DemoProcfile: use double dash
2015-11-23 23:32:33 -08:00
Gyu-Ho Lee 7b90faafad V3DemoProcfile: use double dash
This just makes the V3DemoProcfile flags consistent with the other Procfile.
(Makes the single dash to double dash)

Related to https://github.com/coreos/etcd/pull/3911.
2015-11-23 23:27:30 -08:00
Xiang Li 31ac6ad448 Merge pull request #3915 from philips/add-bdarnell
MAINTAINERS: add Ben Darnell
2015-11-23 21:03:22 -08:00
Brandon Philips 1a3092b954 MAINTAINERS: add Ben Darnell
Add Ben Darnell as a maintainer because of his ongoing and significant contributions to the raft package in this repo.
2015-11-23 17:22:43 -08:00
Xiang Li b31b946a08 Merge pull request #3913 from xiang90/update_doc
doc: talk about update client urls in reconf doc
2015-11-23 15:32:32 -08:00
Xiang Li c60933ebd9 doc: talk about update client urls in reconf doc 2015-11-23 15:32:11 -08:00
Jonathan Boulle 6df57cdcfa Merge pull request #3911 from gyuho/proc_double_dash
Procfile: change it to double-dash in Procfile
2015-11-23 13:05:27 -08:00
Gyu-Ho Lee b83b0af41f Procfile: change it to double-dash in Procfile
This makes flags to etcdmain consistent with man page in help.go. The standard
Go flag package supports both '-' and '--', different than most of CLI
packages, but etcdctl with codegansta/cli uses double-dash('--'), which
sometimes gets confusing, especially to new users.
2015-11-23 12:58:21 -08:00
Xiang Li d435d443bb Merge pull request #3895 from yichengq/storage-watchid
storage: add watch ID to identify watchings
2015-11-22 22:15:59 -08:00