9463 Commits

Author SHA1 Message Date
Gergely Csatari
e7314a2460 libraries-and-tools.md: add C++ client package 2016-08-30 09:51:27 -07:00
Xiang Li
9e9bbb829e Merge pull request #6289 from purpleidea/feat/move-readynotify
embed: Move the ReadyNotify() call to a more sane place
2016-08-29 20:06:17 -07:00
Xiang Li
547bf1a92d Merge pull request #6284 from glycerine/fix6278
fix unintended deadlock on key prefixes
2016-08-29 19:50:50 -07:00
James Shubin
9aee3f01cd embed: Move the ReadyNotify() call to a better place
When using the embed functionality, you can't call the Server.Stop()
function until StartEtcd returns, which can block until there is a call
to Server.Stop() in error situations. Since we have a catch-22, the
ReadyNotify() can be called manually by the user if they wish to wait
for the server startup, or in parallel with a timeout if they wish to
cancel it after some time.

Chzz pointed out that this is also more consistent with the
etcdserver.Start() behaviour too.

purpleidea pointed out that this is actually more correct too, because
we can now register the stop interrupt handler before we block on
startup.
2016-08-29 22:45:41 -04:00
Jason E. Aten
9497e9678c clientv3/concurrency: allow election on prefixes of keys.
After winning an election or obtaining a lock, we
auto-append a slash after the provided key prefix.
This avoids the previous deadlock due to waiting
on the wrong key.

Fixes #6278
2016-08-29 18:34:14 -07:00
Xiang Li
48f4a7d037 Merge pull request #6286 from bdarnell/initial-election-check-quorum
raft: Allow an election immediately after start with checkQuorum
2016-08-29 17:59:32 -07:00
Ben Darnell
a7a867c1e6 raft: Allow an election immediately after start with checkQuorum
Previously, the checkQuorum flag required an election timeout to
expire before a node could cast its first vote. This change permits
the node to cast a vote at any time when the leader is not known,
including immediately after startup.
2016-08-30 08:28:41 +08:00
Xiang Li
f4c30425c0 Merge pull request #6298 from sinsharat/master
store: added missing test case scenerio for scan of de-queued entries
2016-08-29 13:55:55 -07:00
Gyu-Ho Lee
452dedf8ab Merge pull request #6297 from gyuho/grpc-proxy
grpcproxy: fix recursive Context method
2016-08-29 13:31:44 -07:00
Xiang Li
f6cda8ac0b Merge pull request #6299 from sinsharat/master
store: removed duplicate method call for the same method
2016-08-29 13:27:57 -07:00
Gyu-Ho Lee
396fac416e Merge pull request #6273 from gyuho/get-cmd
ctlv3: add 'print-value-only' flag to get command
2016-08-29 13:25:30 -07:00
Xiang Li
db7e38b0ed Merge pull request #6300 from sinsharat/master
wal: document grammar correction
2016-08-29 12:22:38 -07:00
sharat
69ed560fae wal: document grammar correction
Corrected grammar mistake for doc.go
2016-08-30 00:50:02 +05:30
sharat
754b9025c4 store: removed duplicate method call for the same method
the get func was calling path's Join and clean method which is already
being in internalGet(nodePath) func. Hence the func was getting called
unnecessarily twice which is not needed.

#6295
2016-08-30 00:44:53 +05:30
Gyu-Ho Lee
1c59708c51 e2e: test 'print-value-only' flag 2016-08-29 12:09:16 -07:00
Gyu-Ho Lee
524a5a1afb ctlv3: add 'print-value-only' flag to get command 2016-08-29 12:09:07 -07:00
Xiang Li
45079ec6c1 Merge pull request #6274 from dghubble/etcd3-rkt-docs
Documentation: Add initial etcd3 with rkt docs
2016-08-29 12:01:27 -07:00
sharat
4f150b06e5 store: added missing test case scenerio for scan of de-queued entries
Test case added to check err handing for replaced entries.

#6255
2016-08-30 00:30:48 +05:30
Dalton Hubble
fa79d42b98 Documentation: Add initial etcd3 with rkt docs 2016-08-29 11:59:46 -07:00
Gyu-Ho Lee
86bf2bc443 grpcproxy: fix recursive Context method 2016-08-29 11:37:35 -07:00
Anthony Romano
e53b99588a Merge pull request #6288 from heyitsanthony/fix-retryread
clientv3: retry non-mutable rpcs on Internal codes
2016-08-28 20:41:19 -07:00
Anthony Romano
5e963608b7 clientv3: do not treat Internal codes as halting
Fixes #6277
2016-08-28 20:20:22 -07:00
Anthony Romano
3552420dfd clientv3: set failfast=false on read-only txns 2016-08-28 19:40:38 -07:00
Anthony Romano
64ac631863 rpctypes: set unknown codes to Unknown instead of internal
An unrecognized error code isn't "very broken".
2016-08-28 19:37:35 -07:00
Gyu-Ho Lee
f73258a51f Merge pull request #6282 from gyuho/tester-error
etcd-tester: return error for mismatch rev/hash
2016-08-27 22:25:18 -07:00
Gyu-Ho Lee
0bf2ef3c1b etcd-tester: return error for mismatch rev/hash 2016-08-27 22:14:42 -07:00
Xiang Li
a0759298c5 Merge pull request #6281 from xiang90/fix
etcd-tester: do not restart stresser on error
2016-08-27 20:49:08 -07:00
Xiang Li
017aac88a8 etcd-tester: do not restart stresser on error 2016-08-27 20:47:45 -07:00
Xiang Li
0be190df4d Merge pull request #6279 from xiang90/fix_hash
mvcc: force commit and hash should be atomic for getting hash
2016-08-27 20:09:22 -07:00
Xiang Li
1437388f77 mvcc: force commit and hash should be atomic for getting hash 2016-08-27 19:22:22 -07:00
Anthony Romano
c388b2f22f Merge pull request #6264 from heyitsanthony/error-codes
clientv3: use grpc codes to translate raw grpc errors
2016-08-26 11:52:37 -07:00
Anthony Romano
a50c707050 clientv3/integration: wait for two request timeouts in txn tests
Read only txns and Get may timeout once if the leader is lost.
2016-08-26 10:04:10 -07:00
Xiang Li
3a49cbb769 Merge pull request #6269 from aaronlehmann/hold-lock-while-renaming
On non-Windows OS, hold file lock while renaming WAL directory
2016-08-26 09:53:59 -07:00
Aaron Lehmann
af4f82228c wal: hold file lock while renaming WAL directory on non-Windows
Windows requires this lock to be released before the directory is
renamed. But on unix-like operating systems, releasing the lock and
trying to reacquire it immediately can be flaky if a process is forked
around the same time. The file descriptors are marked as close-on-exec
by the Go runtime, but there is a window between the fork and exec where
another process will be holding the lock.
2016-08-26 09:27:51 -07:00
Anthony Romano
df54ad2208 v3rpc, rpctypes: add error types for timeouts 2016-08-26 09:22:09 -07:00
Anthony Romano
267063efd0 clientv3: use grpc codes to translate raw grpc errors 2016-08-26 09:22:09 -07:00
Xiang Li
417b9469aa Merge pull request #6270 from heyitsanthony/etcdserver-timeout
etcdserver: use request timeout defined by ServerConfig for v3 requests
2016-08-25 20:50:21 -07:00
Anthony Romano
254c0ea814 etcdserver: use request timeout defined by ServerConfig for v3 requests 2016-08-25 18:39:01 -07:00
Anthony Romano
4f5cacc835 Merge pull request #6267 from heyitsanthony/fix-wal-tear
wal: fix CRC corruption on writes following write tears
2016-08-25 17:10:08 -07:00
Anthony Romano
f1ead43482 wal: zero out wal tail past its first zero record
Whenever the WAL is opened for writes, it should write zeroes to its tail
starting from the first zero record. Otherwise, if there are entries past
the first zero record due to a torn write, any new writes that overlap the
old entries will lead to a garbage record on the tail and cause a CRC
mismatch.
2016-08-25 14:24:46 -07:00
Anthony Romano
58a36cb651 fileutil: add ZeroToEnd for zeroing files 2016-08-25 14:24:46 -07:00
Anthony Romano
0d8d9a374c wal: test for truncation on torn writes 2016-08-25 14:24:46 -07:00
Xiang Li
488ae52a51 Merge pull request #6259 from xiang90/fix_test_c
clientv3/integration: fix TestKVPutStoppedServerAndClose
2016-08-24 14:14:17 -07:00
Xiang Li
f2b7c501cc clientv3/integration: fix TestKVPutStoppedServerAndClose 2016-08-24 13:57:27 -07:00
Xiang Li
bb110b0a2d Merge pull request #6257 from heyitsanthony/doc-fix-buglink
Documentation: update links for unaligned 64-bit atomics issue
2016-08-24 09:37:00 -07:00
Anthony Romano
159c8ee6e0 Documentation: update links for unaligned 64-bit atomics issue
Fixes #6256
2016-08-24 09:13:53 -07:00
Anthony Romano
1c989edb47 Merge pull request #6253 from heyitsanthony/srv-arec
discovery: reject IP address records in SRVGetCluster
2016-08-24 06:56:17 -07:00
Anthony Romano
3dc12e33f1 discovery: reject IP address records in SRVGetCluster
Was incorrectly trimming the trailing '.' from the target; this in turn
caused the etcd server to accept any SRV record with an IP target
instead of only targets with A records.
2016-08-23 18:10:42 -07:00
Xiang Li
8e4fcaa6dc Merge pull request #6251 from xiang90/ctl_doc
etcdctl: list output options
2016-08-23 11:32:33 -07:00
Xiang Li
86dcfbf205 etcdctl: list output options 2016-08-23 11:32:00 -07:00