6335 Commits

Author SHA1 Message Date
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
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
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
Yicheng Qin
deb1da5f57 storage: add watch ID to identify watchings
One watcher includes multiple watchings, and their events are
sent out through one channel. For the received event, user would like to
know which watching it belongs to.

Introduce a watch ID. When watching on some key, user will get a watch
ID. The watch ID is attached to all events that is observed by this
watch.
2015-11-21 11:19:17 -08:00
Xiang Li
2de9a5bbd0 Merge pull request #3899 from gyuho/3859_synced_map
storage: use map for watchableStore synced
2015-11-21 08:06:00 -08:00
Gyu-Ho Lee
48aebd9b09 storage: use map for watchableStore synced
This is for coreos#3859 switching slice to map for synced watchings.
For a large amount of synced watchings, map implementation performs better.
When putting 1 million watchers on the same key and canceling them one by
one: original implementation takes 9m7.268221091s, while the one with map
takes only 430.531637ms.
2015-11-21 00:42:09 -08:00
Xiang Li
31574cb9da Merge pull request #3905 from xiang90/etcdctl_health
etcdctl: cluster health exit with non-zero when cluster is unhealthy
2015-11-20 14:38:18 -08:00
Xiang Li
37b34b334b Merge pull request #3887 from ypu/flags
etcdmain: Add max-snapshots and max-wals to help
2015-11-20 14:20:57 -08:00
Xiang Li
a211ba3361 Merge pull request #3890 from gyuho/pipeline_full_message
rafthttp: more detailed logs when filled-up buffer
2015-11-20 14:09:34 -08:00
Xiang Li
e39206e084 etcdctl: cluster health exit with non-zero when cluster is unhealthy 2015-11-20 13:51:31 -08:00
Jonathan Boulle
82b83cad43 Merge pull request #3904 from coreos/jonboulle-patch-2
MAINTAINERS: remove blake, fix xiang's handle
2015-11-20 13:30:46 -08:00
Jonathan Boulle
6fae5f5a0a MAINTAINERS: remove blake, fix xiang's handle 2015-11-20 13:26:45 -08:00
Xiang Li
11d00c7919 Merge pull request #3897 from xiang90/fix_watch
v3rpc: do not send closing event
2015-11-20 09:40:46 -08:00
Xiang Li
b104df4b17 Merge pull request #3898 from mitake/get-quorum
etcdctl: a new option for quorum get
2015-11-20 08:08:49 -08:00
Xiang Li
b868f4b1b1 v3rpc: report eventReceived correctly 2015-11-19 22:44:46 -08:00
Hitoshi Mitake
11f49a0960 etcdctl: a new option for quorum get
Current etcdctl seems to lack an option for specifying quorum flag for
GET. This commit adds the option.
2015-11-20 14:09:50 +09:00
Xiang Li
3cf90a4dff v3rpc: do not send closing event
When a watch stream closes, both of the watcher.Chan and closec
will be closed.

If watcher.Chan is closed, we should not send out the empty event.
Sending the empty is wrong and waste a lot of CPU resources.
Instead we should just return.
2015-11-19 17:56:15 -08:00
Xiang Li
c400d05d0a Merge pull request #3892 from xiang90/fix_snapshot_handling
etcdserver: handle incoming v3 snapshot correctly
2015-11-19 12:18:18 -08:00
Xiang Li
cf2d20c5c9 Merge pull request #3851 from yichengq/storage-kv-data
storage: save the KeyValue instead of Event in backend
2015-11-19 10:24:50 -08:00
Yicheng Qin
1214f77519 storage: set revBytes capacity to avoid malloc when appending mark
This is a performance optimization.
2015-11-19 09:53:31 -08:00
Jonathan Boulle
f62e0ced9b Merge pull request #3893 from coreos/jonboulle-patch-1
docs/benchmarks: small fix in memory benchmark
2015-11-18 21:02:52 -08:00
Yiqiao Pu
ddc4f8bd45 etcdmain: Add max-snapshots and max-wals to help
Based on the configuration doc, seems these two flags are missing
in the help. So add them and the descriptions are from config.go in
the same directory.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2015-11-19 11:58:00 +08:00
Jonathan Boulle
6f3ce70b46 docs/benchmarks: small fix in memory benchmark 2015-11-18 19:20:18 -08:00
Xiang Li
a07e4bb6e2 etcdserver: handle incoming v3 snapshot correctly
1. we should update all kv reference (including the
on in snapStore).

2. we should first restore a new KV and then close
the old one asynchronously.
2015-11-18 16:07:41 -08:00
Gyu-Ho Lee
6aa559f93d rafthttp: more detailed logs when filled-up buffer
This adds more detailed explanation about why some messages got dropped to help
users debug. This is for https://github.com/coreos/etcd/issues/3806.
2015-11-18 14:17:43 -08:00
Jonathan Boulle
33065739df Merge pull request #3782 from gyuho/doc.go_for_package_description
*: add missing package descriptions
2015-11-18 11:32:37 -08:00
Gyu-Ho Lee
81229dbea9 *: add missing package descriptions
This adds and updates package descriptions in etcd projects.
And also deletes some duplicate LICENSE statements.
2015-11-17 20:54:10 -08:00
Yicheng Qin
2f74f76025 storage: remove the event concept from key-value layer
The point is to decouple the key-value storage layer and the
event notification layer clearly. It gives the watchableKV the
flexibility to define whatever event structure it wants without
breaking the ondisk format at key-value storage layer.

Changes:

1. change the format of key and value stored in backend

Store KeyValue struct instead of Event struct in backend value for
better abstraction as xiang suggests. And record the corresponded
action in the backend key.

2. Remove word 'event' from functions
2015-11-17 20:35:49 -08:00
Josh Wood
c4672ced3e Merge pull request #3885 from joshix/prodready
README: Outright production-readiness
2015-11-17 18:18:16 -08:00
Josh Wood
833f0388cd README: Outright production-readiness
State outright that etcd is used in production and ready for more of same.

Supersedes #3884.

Adopt #3884 in spirit, but directly in README as jonboulle suggested.

Delete Documentation/production-ready.md.
2015-11-17 18:05:31 -08:00
Xiang Li
14c8a1c400 Merge pull request #3883 from gyuho/raft_typo
raft: minor typo in progress.go
2015-11-17 14:22:35 -08:00
Gyu-Ho Lee
e1c108e604 raft: minor typo in progress.go
Fixes a minor typo.
2015-11-17 14:21:35 -08:00
Xiang Li
db4dcbf827 Merge pull request #3881 from xiang90/godep
Godeps: add LICENSE file for ugorji/go
2015-11-17 13:38:06 -08:00
Xiang Li
0f339aaf2d godep: update godep 2015-11-17 13:18:24 -08:00