Anthony Romano
64596f0c49
etcdserver/test: synchronously wait on TestApplySnapshotAndCommittedEntries
...
Replaces the RecorderBuffered with a RecorderStream so Wait will block
waiting for updates to the etcdserver store.
Fixes #4296
2016-01-26 21:03:03 -08:00
Anthony Romano
384cc76299
pkg/testutil: make Recorder an interface
...
Provides two implementations of Recorder-- one that is non-blocking
like the original version and one that provides a blocking channel
to avoid busy waiting or racing in tests when no other synchronization
is available.
2016-01-05 09:39:18 -08:00
Anthony Romano
e1bf726bc1
*: split out etcdserver's test mockup objects to live in interfaces' packages
2016-01-05 09:39:13 -08:00
mqliang
1c559bdb33
store: refactor
...
use defer statement to update `Stats` and report R/W Sucess/Failure, so
that the logic of Store's CURD operation and `Stats` update logic can be
separated.
2015-12-15 16:50:02 +08:00
Gyu-Ho Lee
c2dcf7431e
etcdserver, store: fix grammars in comments (a->an existing)
...
I found some grammatical errors in comments.
This pull request was submitted https://github.com/coreos/etcd/pull/3513 .
I am resubmitting following the correct guidlines.
2015-09-14 13:41:13 -07:00
Xiang Li
a7b9bff939
store: add 0 as padding for better lexicographic sorting.
2015-08-13 13:42:37 -07:00
Michal Witkowski
7bca757d09
*: add metrics to store
and proxy
.
2015-07-07 16:01:51 +01:00
Brandon Philips
2a675c08c2
store: always check the error
...
Ensure that we propogate any errors out of the node.Remove operation
back to the user. There is no reason to assume here.
2015-04-16 17:22:57 -07:00
Xiang Li
d459ae0df3
store: remove unused ACL field
2015-02-28 11:46:21 -08:00
Xiang Li
a4dab7ad75
*: do not block etcdserver when encoding store into json
...
Encoding store into json snapshot has quite high CPU cost. And it
will block for a while. This commit makes the encoding process non-
blocking by running it in another go-routine.
2015-02-28 11:41:58 -08:00
Yicheng Qin
3ac0298bd0
store: set readonly to pre-defined namespaces
2015-02-04 16:47:08 -08:00
Yicheng Qin
f13c7872d5
etcdserver: register pre-defined namespaces in store
2015-02-04 16:33:40 -08:00
Jonathan Boulle
f1ed69e883
*: switch to line comments for copyright
...
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Jonathan Boulle
7a4d42166b
*: add license header to all source files
2014-10-17 15:41:22 -07:00
Jonathan Boulle
1456ae4453
store: restore minExpireTime check and advance FakeClock appropriately
2014-10-17 10:05:29 -07:00
Jonathan Boulle
3134658ded
store: switch to fake clock
2014-10-17 10:05:29 -07:00
Jonathan Boulle
1fa763b47b
store: remove unused function
2014-10-17 00:07:23 -07:00
Jonathan Boulle
b15fefa8ea
store: use nextIndex where necessary
2014-09-24 14:07:52 -07:00
Jonathan Boulle
5441c6aa54
etcdserver: correct X-Etcd-Index header
...
This adds an EtcdIndex field to store.Event and uses that as the header
instead of the node's modifiedIndex. To facilitate this in a non-racy
way, we set the EtcdIndex while holding the lock.
2014-09-22 18:56:12 -07:00
Jonathan Boulle
e08df4c8d2
store: fix recursive/dir arguments
2014-09-22 14:44:01 -07:00
Jonathan Boulle
f7444ff300
store: convert Watch to interface
2014-09-09 11:17:53 -07:00
Blake Mizerany
f4613dd466
store: remove Root
2014-09-03 09:20:18 -07:00
Blake Mizerany
f8be54b416
...deadlocked...
2014-09-03 09:20:17 -07:00
Blake Mizerany
a2b9f9310c
remove pkg/strings
2014-09-03 09:20:06 -07:00
Blake Mizerany
e9a45ae35d
remove goraft
2014-09-03 09:20:05 -07:00
Xiang Li
8ea840c19a
store: fix index data race
2014-09-03 09:19:53 -07:00
Xiang Li
516ebdb49e
fix(store): synchronize access to CurrentIndex
2014-05-20 13:53:47 -07:00
Yicheng Qin
fa54866e99
Revert "Merge pull request #631 from metaflow/fix-delete-key-as-directory"
...
This reverts commit b87972713e17fb815bfe42f25a63f94f232007e2, reversing
changes made to bd8d45ce28d6f9ddb9c5164f58aca8f9a6359f7b.
2014-04-21 17:55:44 -07:00
Mikhail Goncharov
7cebc3999a
api(delete) now you get an error trying to delete files a directory (http.StatusForbidden)
2014-04-21 19:50:57 +07:00
Sam Ghods
3ae0a1e1a6
fix(store.go) include node.dir = true when updating a directory's ttl, fixes coreos/etcd#736
2014-04-17 15:15:41 -07:00
Xiang Li
a9dff278b5
fix(store.go) send event to watcher after we finish modifying it
2014-04-10 23:27:50 -04:00
Mikhail Goncharov
074c78d725
fix(store): corrected CAS and CAD fail cause in response
...
specifically when both prevIndex and prevValue are provided
2014-03-08 14:50:34 +07:00
evan-gu
9cfd8c5f0b
fix(store): make NodeExtern.Value a *string
...
Before this change if the value of a Node was "" it would get dropped from the json
encoding and the Node.Value field would be missing. Fix this problem by making
NodeExtern.Value a *string so that an empty string will be encoded but a nil value
will drop the field.
2014-02-18 00:50:44 -05:00
Brandon Philips
2a2714a4bf
Merge pull request #514 from cenkalti/prevNode
...
feat(prevNode): add "prevNode" to "Set" response
2014-02-07 12:04:18 -08:00
evan-gu
8d2a8e1c7a
fix some typos in comments in store.go
2014-02-04 14:17:44 -05:00
Cenk Alti
3ec7004421
feat(prevNode): add "prevNode" to "Set" response
2014-01-29 17:30:33 -08:00
Brandon Philips
1b00c449a5
Revert "Better error message when setting values on directories"
...
This reverts commit d13dd50d5107b10eaeda734d971cd4512cb4a304.
2014-01-23 11:22:11 -08:00
Kelsey Hightower
d13dd50d51
Better error message when setting values on directories
...
Without this commit etcd returns the following error message when
setting values on directories:
{
"errorCode":102,
"message":"Not a file",
"cause":"/postgres",
"index":2
}
While the above error message is accurate it's not very descriptive.
This commit adds a new error code/message which better describes why the
write operation failed. etcd now returns the following:
{
"errorCode":109,
"message":"Cannot set value on directory",
"cause":"/postgres",
"index":2
}
2014-01-22 23:02:33 -08:00
tobz
7a948746a8
fix(store): move logic to handle whether or not to notify (re: hidden keys) entirely into watcher hub
2014-01-22 09:02:42 -05:00
tobz
139f59f7d1
fix(store): properly hide hidden keys from watchers, not just gets
2014-01-21 20:26:56 -05:00
Xiang Li
22a25a18b3
feat(stream watchers) add stream watcher support
2014-01-09 15:28:33 +08:00
Xiang Li
2bfb8f5e4f
Merge pull request #418 from xiangli-cmu/cancel_watcher
...
cancel watcher
2014-01-08 21:34:32 -08:00
Xiang Li
fa3b4a7941
refactor(watcher) change newWatcher to Watch
2014-01-09 13:29:04 +08:00
Xiang Li
189b98c03f
refactor(node_extern.go) remove unused prevValue field
2014-01-01 20:01:29 +08:00
Xiang Li
f46fdbf078
feat(node_extern.go) add prevNode field
2014-01-01 19:50:07 +08:00
Xiang Li
59ccefee0f
fix(watchhub.go) add a lock to protect the hashmap
2013-12-28 14:55:50 +08:00
Xiang Li
5e499456f0
init cancel watcher
2013-12-26 22:06:15 +08:00
Xiang Li
bfa7d54b02
refactor(store.go) handle short condition first
2013-12-25 19:01:04 +08:00
Xiang Li
9cf1fcc987
refactor(compareAndDelete)
2013-12-20 05:10:22 +08:00
Xiang Li
e2fa89d554
merge compareAndDelete
2013-12-19 22:19:49 +08:00