6284 Commits

Author SHA1 Message Date
Xiang Li
9e4a003fb0 etcdmain: fix unstoppable startEtcd function
We should wrap the blocking function with a closure. And first
creates a go routine to execute the function. Or the inner function
blocks before creating the go routine.
2015-11-17 09:04:00 -08:00
Xiang Li
8af76115cb Merge pull request #3873 from yichengq/func-long-timeout
tools/etcd-tester: extend timeout for stresser
2015-11-17 07:59:41 -08:00
Xiang Li
08dc70cc0f Merge pull request #3875 from xiang90/fix_txn
etcdserver: start real txn for txn request
2015-11-16 21:16:20 -08:00
Xiang Li
b4abe5b584 etcdserver: start real txn for txn request
We should open real txn for applying txn requests. Or the intermediate
state might be observed by reader.

This also fixes #3803. Same consistent(raft) index per multiple indenpendent
operations confuses consistentStore.
2015-11-16 21:11:27 -08:00
Xiang Li
5d0268aa2e Merge pull request #3877 from bdarnell/campaign-while-leader
raft: no-op instead of panic for Campaigning while leader
2015-11-16 19:59:34 -08:00
Ben Darnell
fbeb58d265 raft: no-op instead of panic for Campaigning while leader
We need to be able to force an election (on one node) after creating a
new group (cockroachdb/cockroach#1384), but it is difficult to ensure
that our call to Campaign does not race with an election that may be
started by raft itself. A redundant call to Campaign should be a no-op
instead of a panic. (But the panic in becomeCandidate remains, because
we don't want to update the term or change the committed index in this
case)
2015-11-16 21:44:14 -05:00
Jonathan Boulle
5fa875fb5d Merge pull request #3876 from jonboulle/master
scripts: clean up genproto
2015-11-16 16:43:11 -08:00
Jonathan Boulle
dd0932a78d scripts: clean up genproto
Rather than copying in .proto files, use the same symlink
trick we do for doing the actual etcd build.

Also check for exact version of protoc early on.
2015-11-16 15:26:22 -08:00
Xiang Li
32460538ba Merge pull request #3862 from xiang90/watch_bench_doc
doc: add etcd3 watch benchmark doc
2015-11-16 12:14:19 -08:00
Yicheng Qin
dfc7cc7a62 tools/etcd-tester: extend timeout for stresser
Extend the timeout from 1s to defaultRequestTimeout 5s.

The 1s may bring unwanted burden to the target member. If the member is
busy at recovering, it has limited bandwidth for client requests. A
short timeout at client side will retry quickly while keeping the
on-going connections. Thus, etcd will queue lots of requests and
connections and takes long time to clear them. This finally causes the
timeout of member health check.

This problem is a general one that how etcd handles amounts of requests
at the same time in a good way. We don't plan to address it at current
stage.
2015-11-16 11:47:08 -08:00
Xiang Li
6c0f14cefc Merge pull request #3870 from yichengq/fix-raft-log
raft: fix print format for term in one log line
2015-11-15 20:31:18 -08:00
Yicheng Qin
3a65442d7d raft: fix print format for term in one log line
`term` should be printed in decimal representation instead of
hexadecimal one.
2015-11-15 20:26:16 -08:00
Xiang Li
fdd87cd899 Merge pull request #3868 from xiang90/fix_auth_guest
auth: use canonical path for pre-defined guest role
2015-11-15 19:17:16 -08:00
Xiang Li
a1616afc5d auth: use canonical path for pre-defined guest role 2015-11-15 17:58:09 -08:00
Xiang Li
6bdc81d979 Merge pull request #3865 from gyuho/map_populate_for_unix
storage/backend: support MAP_POPULATE for unix
2015-11-15 16:53:32 -08:00
Gyu-Ho Lee
7638423f85 storage/backend: support MAP_POPULATE for unix
This adds build constraints in order to pass memory-map flags to bolt.Option.
If backend package passes syscall.MAP_POPULATE flag, the boltdb does read-ahead
which speeds up entire-database read, which then leads to faster storage
Restore. Benchmark result shows for 4GB, it opens and loads 6x faster in SSD,
and 12x faster in HDD. For 2GB, 1.6x faster with MAP_POPULATE in SSD.
2015-11-15 16:47:38 -08:00
Xiang Li
37d3d20211 doc: add etcd3 watch benchmark doc
The primary goal of this doc is to confirm the memory
consumption of watch is as expected. Each connection
consumes O(10kb) of memory. Each stream consumes O(10kb)
of memory. Each watching consumes < O(1kb) of memory.

Then when you have a large number of watching with small
number of connections and streams, the ave memory consumption
per watch will be O(1kb).
2015-11-15 16:38:09 -08:00
Xiang Li
185097ffaa Merge pull request #3860 from gyuho/typo_in_wal
wal: minor typo in wal pkg
2015-11-12 16:14:16 -08:00
Gyu-Ho Lee
55adfcb428 wal: minor typo in wal pkg
Fixes a minor typo in wal.go.
Thanks!
2015-11-12 15:23:12 -08:00
Xiang Li
5acf5579b7 Merge pull request #3858 from gyuho/godep_bolt_20151112
Godeps: update boltdb/bolt for MAP_POPULATE
2015-11-12 13:17:26 -08:00
Gyu-Ho Lee
b4e0dbe721 Godeps: update boltdb/bolt for MAP_POPULATE
This is for https://github.com/boltdb/bolt/pull/455.
2015-11-12 12:25:37 -08:00
Xiang Li
de02254659 Merge pull request #3853 from xiang90/lease_new
lease: delete items when the lease is revoked.
2015-11-11 22:13:37 -08:00
Xiang Li
bf3bc0ed6b lease: delete items when the lease is revoked.
Add minimum KV interface and implmement the deleting mechanism for
revoking lease.
2015-11-11 13:21:12 -08:00
Xiang Li
2990249c1d Merge pull request #3856 from xiang90/raft_doc_restart
raft: add doc to make restart clear
2015-11-11 11:15:49 -08:00
Xiang Li
f7f28b9984 raft: add doc to make restart clear, especially for configuration changed case 2015-11-11 11:11:58 -08:00
Josh Wood
0aa4ce0606 Merge pull request #3855 from xiang90/raft_doc
raft: add more words about raft protocol
2015-11-11 09:42:32 -08:00
Xiang Li
6df52614fc raft: add more words about raft protocol 2015-11-11 09:20:25 -08:00
Yicheng Qin
2d11e7464e Merge pull request #3849 from gyuho/etcdmain_typos_descriptions
etcdmain: minor typo, make descriptions consistent
2015-11-10 13:20:40 -08:00
Gyu-Ho Lee
12b4a122ce etcdmain: minor typo, make descriptions consistent
This fixes some typos and make help.go and config.go flag descriptions
consistent with each other.
2015-11-10 13:00:08 -08:00
Xiang Li
3e74ff7ad4 Merge pull request #3834 from xiang90/lease_new
lease: initial lessor impl
2015-11-10 10:29:19 -08:00
Xiang Li
ff36b9d9bc Merge pull request #3700 from xiang90/metrics_hi
Replace Summary with Histogram for all metrics
2015-11-10 10:06:45 -08:00
Xiang Li
964f6050ee raft: use HistogramVec for message_sent_latency 2015-11-10 10:05:32 -08:00
Xiang Li
434f39d813 Merge pull request #3847 from gyuho/doc_flag_issue3690
etcdmain: more description for init cluster token
2015-11-10 09:42:02 -08:00
Gyu-Ho Lee
5eb57c2aee etcdmain: more description for init cluster token
This adds more description to initial-cluster-token from
https://github.com/coreos/etcd/issues/3690 to help.go.
2015-11-10 09:40:08 -08:00
Yicheng Qin
7ff8ec81ee Merge pull request #3771 from yichengq/cors-auth
pkg/cors: add authorization into Access-Control-Allow-Headers
2015-11-10 08:05:53 -08:00
Xiang Li
ad55630aa8 Merge pull request #3844 from gyuho/docker_guide_etcd_version
Documentation: docker pull latest etcd from quay
2015-11-09 20:59:28 -08:00
Gyu-Ho Lee
b6afe94aee Documentation: docker pull latest etcd from quay
As pointed out at https://github.com/coreos/etcd/issues/3843, Docker guide uses
outdated version of etcd. This docker commands will pull from the latest
releases.
2015-11-09 19:52:41 -08:00
Josh Wood
8ce4313b22 Merge pull request #3841 from joshix/toolexamplelink
Documentation/security: Fix links about tls keygen.
2015-11-09 16:36:48 -08:00
Josh Wood
95ade2c0ac Documentation/security: Fix links about tls keygen.
Edit to replace a relative link (won't work with that target) with
an absolute link.
Heading 1 Title Case.
Polish graf 3.

Fixes https://github.com/coreos/docs/issues/662
2015-11-09 16:12:56 -08:00
Jonathan Boulle
1f965972fc Merge pull request #3839 from xiang90/rename
etcdserver: rename processInternalRaftReq to processInternalRaftRequest
2015-11-10 00:56:18 +01:00
Xiang Li
ae2f69b41e etcdserver: rename processInternalRaftReq to processInternalRaftRequest
We have a structure called InternalRaftRequest. Making the function
shorter by calling it processInternalRaftReq seems to be random and
reduce the readability. So we just use the full name.
2015-11-09 13:37:36 -08:00
Yicheng Qin
213e246f13 Merge pull request #3838 from mlahaye/typofix
etcdctl: fix typo in error message (Invaild to Invalid)
2015-11-09 13:20:21 -08:00
Maxime Lahaye
735440e52d etcdctl: fix typo in error message (Invaild to Invalid) 2015-11-09 15:10:35 -06:00
Jonathan Boulle
31601d494d Merge pull request #3819 from gyuho/shorten_interval_for_first_retrials
proxy: expedite proxy refresh given no endpoints
2015-11-09 15:45:26 +01:00
Xiang Li
dcf0b45483 Merge pull request #3835 from gyuho/doc_typo_20151108
Doc: fix typos for v3benchmark
2015-11-08 19:40:43 -08:00
Gyu-Ho Lee
a27a6b1372 Doc: fix typos for v3benchmark
The official benchmakr code seems to be in `tools` directory (not in `hack`).
2015-11-08 19:38:49 -08:00
Xiang Li
bf70b5127a lease: initial lessor impl 2015-11-08 11:28:50 -08:00
Gyu-Ho Lee
ca25ed3ad2 proxy: expedite proxy refresh given no endpoints
This fixes coreos#3647 by giving shorter proxy refresh interval whenever
there is no endpoints found. Deleted sleep command in Procfile and proxy
documentation accordingly.
2015-11-07 07:27:39 -08:00
Xiang Li
7c9e92d1d5 Merge pull request #3830 from xiang90/bolt
Godeps: update boltdb
2015-11-06 13:04:38 -08:00
Xiang Li
4669b899cc Godeps: update boltdb 2015-11-06 12:58:28 -08:00