9008 Commits

Author SHA1 Message Date
Gyu-Ho Lee
a091c629e1 version: bump to v3.0.11+git 2016-10-07 13:25:21 -07:00
Gyu-Ho Lee
96de94a584 version: bump to v3.0.11 v3.0.11 2016-10-07 11:27:48 -07:00
Gyu-Ho Lee
e9cd8410d7 integration: add 'prevKV' to TestV3DeleteRange 2016-10-07 11:03:19 -07:00
Gyu-Ho Lee
e37ede1d2e etcdserver: handle 'PrevKV' 2016-10-07 11:00:48 -07:00
Gyu-Ho Lee
4420a29ac4 etcdctl/ctlv3: add 'prev-kv' flag 2016-10-07 10:56:06 -07:00
Gyu-Ho Lee
0544d4bfd0 clientv3: add WithPrevKV OpOption 2016-10-07 10:54:45 -07:00
Gyu-Ho Lee
fe7379f102 clientv3: add Op.prevKV 2016-10-07 10:51:01 -07:00
Gyu-Ho Lee
c76df5052b *: update proto to add 'prev_kv' 2016-10-07 10:47:47 -07:00
Xiang Li
3299cad1c3 *: add put prevkv 2016-10-07 10:39:08 -07:00
Anthony Romano
d9ab018c49 integration: test a canceled watch won't return a closing error 2016-10-05 14:19:36 -07:00
Anthony Romano
e853451cd2 clientv3: only return closing error to watcher if context is not canceled
Fixes #6503
2016-10-05 14:19:32 -07:00
Anthony Romano
1becf9d2f5 clientv3: fix race on watch initial revision
The initial revision was being updated in the substream goroutine defer;
this was racing with the resume path fetching the initial revision when
the substream closes during resume. Instead, update the initial revision
whenever the substream processes a new watch response. Since the substream
cannot receive a watch response while it is resuming, the write to the
initial revision is ordered to always happen after the resume read.

Fixes #6586
2016-10-05 10:56:36 -07:00
Anthony Romano
1a712cf187 clientv3: make IsProgressNotify() false on compact event and closed channel
Fixes #6549
2016-10-04 15:13:02 -07:00
Gyu-Ho Lee
023f335f67 wal: set PageWriter offset in file encoder 2016-10-04 15:12:47 -07:00
Gyu-Ho Lee
bf0da78b63 pkg/ioutil: configure pageOffset in NewPageWriter 2016-10-04 15:12:46 -07:00
Anthony Romano
e8473850a2 integration: test canceling watchers when disconnected 2016-10-04 15:12:37 -07:00
Anthony Romano
b836d187fd clientv3: simplify watch synchronization
Was more complicated than it needed to be and didn't really work in the
first place. Restructured watcher registation to use a queue.
2016-10-04 15:12:18 -07:00
Gyu-Ho Lee
9b09229c4d version: bump to v3.0.10+git 2016-09-23 11:13:45 -07:00
Gyu-Ho Lee
546c0f7ed6 version: bump to v3.0.10 v3.0.10 2016-09-23 10:49:03 -07:00
sharat
adbad1c9b5 ctlv3: close snapshot file before rename (Windows) 2016-09-23 09:11:02 -07:00
Anthony Romano
273b986751 clientv3: process closed watcherStreams in watcherGrpcStream run loop
Was racing with Watch() when closing the grpc stream on no watchers.

Fixes #6476
2016-09-21 15:52:20 -07:00
Gyu-Ho Lee
5b205729b9 rafthttp: add v3.0.0 to supported streams 2016-09-16 21:54:55 +09:00
Anthony Romano
fe900b09dd version: bump to v3.0.9+git 2016-09-15 15:10:23 -07:00
Anthony Romano
494c012659 version: bump to v3.0.9 v3.0.9 2016-09-15 12:56:33 -07:00
Anthony Romano
4abc381ebe clientv3: drain buffered WatchResponses before resuming
Otherwise, the watcherStream can receive WatchResponses in the
middle of a resume, corrupting the stream.

Fixes #6364
2016-09-15 12:38:15 -07:00
Anthony Romano
73c8fdac53 integration: fix compilation for backported Election test 2016-09-15 11:45:37 -07:00
sharat
ee2717493a ctlv3: fix line parsing for Windows 2016-09-15 11:25:53 -07:00
Xiang Li
2435eb9ecd clientv3: balancer panics when call up after close
Fix the issue by adding a simple guard varable.
2016-09-15 18:46:26 +09:00
Anthony Romano
8fb533dabe embed: warn on domain name in listener 2016-09-15 18:46:19 +09:00
Anthony Romano
2f0f5ac504 Revert "Merge pull request #6365 from heyitsanthony/fix-dns-bind"
This reverts commit af5ab7b3515cf023af7af94bc6e9063945802be0, reversing
changes made to da6a0f0594f352539349013336614e08033a7eb3.
2016-09-15 18:43:46 +09:00
Jason E. Aten
9ab811d478 auth: fix range handling bugs.
Test 15, counting from zero, in TestGetMergedPerms
in etcd/auth/range_perm_cache_test.go, was trying
incorrectly assert that [a, b) merged with [b, "")
should be [a, b). Added a test specifically for
this. This patch fixes the incorrect larger test
and the bugs in the code that it was hiding.

Fixes #6359
2016-09-15 18:41:56 +09:00
Anthony Romano
e0a99fb4ba version: bump to v3.0.8+git 2016-09-09 15:56:31 -07:00
Anthony Romano
d40982fc91 version: bump to v3.0.8 v3.0.8 2016-09-09 13:14:44 -07:00
Gyu-Ho Lee
fe3a1cc31b wal: fix error type 2016-09-09 09:11:25 +09:00
Gyu-Ho Lee
70713706a1 wal: fix err shadowing (go vet) 2016-09-09 09:07:48 +09:00
Xiang Li
0054e7e89b etcdctl: restore should create a snapshot
Restore should create a snasphot. So the new db file
can be sent to newly joined member.
2016-09-09 09:03:51 +09:00
Anthony Romano
97f718b504 fileutil: windows OpenDir
Windows needs to open a directory with write access to fsync but the go
runtime won't open directories that way.
2016-09-09 09:01:56 +09:00
Anthony Romano
202da9270e wal: fsync directory after wal file rename
Fixes #6368
2016-09-09 09:01:49 +09:00
Anthony Romano
6e83ec0ed7 etcdmain: reject binding listeners to domain names
Fixes #6336
2016-09-07 08:08:35 +09:00
Jason E. Aten
5c44cdfdaa etcdctl/ctlv3: don't crash when we should prompt for pw.
when 'etcdctl --user name get blah' is invoked to
 prompt for password, don't panic.

 addresses the segfault part of #6343
2016-09-04 09:02:50 +09:00
Anthony Romano
09a239f040 e2e: add quoted key/value to txn test 2016-09-04 09:02:47 +09:00
Anthony Romano
3faff8b2e2 etcdctl: fix quoted string handling in txn and watch
Fixes #6315
2016-09-04 09:02:28 +09:00
Anthony Romano
2345fda18e version: bump to v3.0.7+git 2016-08-31 16:41:06 -07:00
Gyu-Ho Lee
5695120efc version: bump to v3.0.7 v3.0.7 2016-08-31 09:49:24 -07:00
Gyu-Ho Lee
183293e061 wal: lowercase segmentSizeBytes 2016-08-31 09:48:30 -07:00
Jason E. Aten
4b48876f0e 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

Conflicts:
	clientv3/concurrency/election.go
	clientv3/concurrency/mutex.go
2016-08-31 09:46:05 -07:00
Aaron Lehmann
5089bf58fb 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-31 09:39:57 -07:00
Anthony Romano
480a347179 wal: use page buffered writer for writing records
Forces torn writes to only happen on sector boundaries.

Fixes #6271
2016-08-30 21:06:36 -07:00
Anthony Romano
59e560c7a7 ioutil: add page buffered writer
A buffered writer that only writes full pages or when explicitly flushed.
2016-08-30 21:06:33 -07:00
Xiang Li
0bd9bea2e9 etcdserver: allow zero kv index for cluster upgrade
If a user upgrades etcd from 2.3.x to 3.0 and shutdown the
cluster immediately without triggering any new backend writes,
then the consistent index in backend would be zero.

The user cannot restart etcdserver due to today's strick index
match checking. We now have to lose this a bit for this case.
2016-08-30 21:05:20 -07:00