Jonathan Boulle
3134658ded
store: switch to fake clock
2014-10-17 10:05:29 -07:00
Jonathan Boulle
5c4edf65f9
store: remove another unused function
2014-10-17 00:07:45 -07:00
Jonathan Boulle
1fa763b47b
store: remove unused function
2014-10-17 00:07:23 -07:00
Jonathan Boulle
70bbf8b470
store: remove more unused code
2014-10-17 00:05:56 -07:00
Jonathan Boulle
2cd6594485
store: remove unused code
2014-10-16 12:28:05 -07:00
Jonathan Boulle
4183b69e12
*: move from third_party to Godep
2014-10-14 00:37:52 -07:00
Jonathan Boulle
a07c51a9c9
store: fix typo "recurisive"
2014-10-08 14:13:38 -07:00
Jonathan Boulle
26160b2154
store: use a larger buffer for eventChan
...
The event channel for watches can drop events too easily in the case of
streaming watches. This increases the buffer to a more useful level.
2014-10-07 01:57:05 -07:00
Jonathan Boulle
1c11f6a144
*: expose etcd-index in watch requests
...
This adds a StartIndex field to the Watcher interface, which represents
the Etcd-Index at which the Watcher is created.
Also refactors the HTTP tests to use a table for most handleWatch tests
2014-10-02 18:10:11 -07:00
Jonathan Boulle
f27b4cbbce
store: add etcd-index tests
2014-09-24 15:04:32 -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
Yicheng Qin
cc1df691cc
store: fix the bug caused by random iteration order over map
2014-09-03 09:20:08 -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
3fba10c8e6
etcd: add version handlers
2014-09-03 09:19:58 -07:00
Xiang Li
8ea840c19a
store: fix index data race
2014-09-03 09:19:53 -07:00
Xiang Li
b951aaf925
store: check remove func before call it
2014-09-03 09:19:50 -07:00
Yicheng Qin
02ced2c2d7
v1: deprecate v1 support
...
Etcd moves to 0.5 without the support of v1.
2014-09-03 09:19:49 -07:00
Xiang Li
973bde9a07
feat(get): get from quorum
2014-06-22 21:33:38 -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 b87972713e
, reversing
changes made to bd8d45ce28
.
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
2dc182189a
Merge pull request #710 from xiangli-cmu/fix_race
...
Fix race
2014-04-14 15:53:04 -04:00
Yicheng Qin
c8de5eee85
fix(server/key): unable to update unexpired ttl
2014-04-14 11:03:46 -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
Tomás Senart
b6053d6a86
Making code formatting consistent.
...
$ gofmt -s -w && goimports -w
2014-03-27 14:19:08 +01:00
Ben Johnson
62b89a128a
Merge branch 'master' of https://github.com/coreos/etcd into proxy
...
Conflicts:
config/config.go
server/peer_server.go
server/transporter.go
tests/server_utils.go
2014-03-24 15:30:14 -07:00
Ben Johnson
174b9ff343
bump(github.com/goraft/raft): 6bf34b9
...
Move from coreos/raft to goraft/raft and update to latest.
2014-03-24 15:09:47 -07: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
Brandon Philips
8485987b74
Merge pull request #524 from yifan-gu/remove_omitempty_on_value
...
remove omitempty on value
2014-02-18 07:08:00 -08: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
Cenk Alti
8bed1e1f15
fix(store/watch): fix the slow consumer bug
2014-02-14 16:52:40 -08:00
Cenk Alti
e73e61f238
test(store/watch): add test case for slow event consumers
2014-02-14 16:12:53 -08:00
Brandon Philips
68383b1293
fix(server/v1): don't fail put on new v1 key
...
We weren't checking for PrevNode being nil in the v1 code path. Do this
and add a test.
Fixes #557
2014-02-10 18:59:56 -08:00
Brian Waldon
60a2709213
chore(gofmt): gofmt compare_and_delete_command.go
2014-02-08 07:28:16 -08: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
Xiang Li
c844fccf2a
fix(watcher_hub) isHidden checks the length of the watchPath before getting subString of keyPath
2014-02-06 11:09:47 -05:00
Xiang Li
1b5f9eb013
test (isHidden) add unit test for isHidden function
2014-02-05 23:32:12 -05:00
Xiang Li
5851cb5b8d
chrod(watcher_hub) add comment to isHidden function
2014-02-05 23:31:38 -05:00
Xiang Li
ba98de6ef0
fix(watch hidden key) Fix hidden keys preventing deeper recursive watches from receiving events
...
If a watcher has given the correct hidden directory, we should allow it to watch the non-hidden events under that hidden directory. This pull request achieves this by checking if the path after the watching prefix has a "/_" which indicates a hidden key.
2014-02-05 22:34:41 -05:00
evan-gu
8d2a8e1c7a
fix some typos in comments in store.go
2014-02-04 14:17:44 -05:00
Brandon Philips
d7d20d1c3d
bump(github.com/stretchr/testify): 9cc77fa25329013ce07362c7742952ff887361f2
2014-02-02 16:57:36 -08:00
Brandon Philips
13b6c1e684
chore(*): make everything use goven
...
for i in github.com/BurntSushi/toml github.com/coreos/go-etcd/etcd github.com/coreos/go-log/log github.com/gorilla/context github.com/rcrowley/go-metrics bitbucket.org/kardianos/osext github.com/coreos/go-systemd/journal github.com/coreos/raft code.google.com/p/goprotobuf/proto ; do goven -copy -rewrite $i; done
2014-02-01 23:44:18 -08:00
Cenk Alti
354a91290e
feat(prevNode): add test for prevNode
2014-01-29 17:52:25 -08: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 d13dd50d51
.
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
Brandon Philips
19ef1042d6
Merge pull request #497 from philips/store-bench-no-rand
...
fix(store/store_bench): don't use rand
2014-01-22 13:19:04 -08:00
tobz
641edd4e6e
test(store): group together all store tests that deal with hidden keys
2014-01-22 09:29:53 -05:00
tobz
823fdfab12
fix(store): make isHidden see if any portion of the path is hidden, not just the last element
2014-01-22 09:29:33 -05:00
tobz
0cacb6cba4
test(store): exercise watchers receiving notifications of non-hidden keys within hidden directories
2014-01-22 09:20:57 -05: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
Brandon Philips
80c22a4fb2
fix(store/store_bench): don't use rand
...
rand just introduces more noise to the results, don't use it.
2014-01-21 17:01:26 -08:00
Xiang Li
3a75d0a465
Merge pull request #493 from xiangli-cmu/bench_watcher
...
test(store_bench_test.go) add watch bench
2014-01-21 07:35:18 -08:00
Xiang Li
17c8f6d2e8
test(store_bench_test.go) add watch bench
2014-01-21 06:51:40 -05:00
Xiang Li
d122ed3bcd
Merge pull request #492 from rwindelz/fix-ttl
...
fix(store): TTL should range 1..n rather than 1..n+1
2014-01-20 09:28:38 -08:00
rwindelz
a2e5bae951
fix(store): TTL should range 1..n rather than 1..n+1
...
was experiencing intermittent functional test fails where TTL was eg 101
when 100 was expected
informal testing on a windows platform shows Go times resolving to the
nanosecond but with an accuracy of approximately 1 millisecond
I believe some of the functional test steps would run in under a
millisecond and cause the TTL to be recomputed with the same time.Now()
value resulting in a TTL that was +1 from the expected
2014-01-19 21:45:53 -08:00
Xiang Li
6f8b0dc7ef
add delete bench
2014-01-17 15:18:11 +08:00
Xiang Li
21f0c6f9d4
feat(store_bench) add set bench for different value sizes
2014-01-17 14:19:31 +08:00
Xiang Li
b226b14eb2
add mem stats for sets benchmark
2014-01-16 16:06:18 +08:00
Xiang Li
c2d1dc4f51
add a setWithJson test
2014-01-16 09:16:33 +08:00
Xiang Li
77477b3e43
feat(store/store_bench_test.go) add a benchmark for set operation of store pkg
...
We randomly generage N 3 level keys. We benchmark the speed of setting each key into etcd store.
2014-01-16 09:03:42 +08:00
Cenk Alti
8597904bc2
feat(stream watchers) fix locking issue
2014-01-10 16:04:23 +02:00
Cenk Alti
c247d807af
feat(stream watchers) end streaming if too many notifications
2014-01-09 14:15:36 +02:00
Xiang Li
22a25a18b3
feat(stream watchers) add stream watcher support
2014-01-09 15:28:33 +08:00
Xiang Li
6b77b94127
Merge pull request #420 from benbjohnson/logging
...
Logging
2014-01-08 21:36:52 -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
Ben Johnson
d7087ed61a
Merge branch 'master' of https://github.com/coreos/etcd into logging
2014-01-02 16:30:09 -07: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
Ben Johnson
cc10b1084d
Merge branch 'master' of https://github.com/coreos/etcd into logging
...
Conflicts:
tests/functional/simple_snapshot_test.go
2013-12-30 16:19:57 -07:00
Ben Johnson
a9e20aecc6
Raft fixes, integrate logging.
2013-12-29 10:40:10 -07:00
Xiang Li
bbbf8fd574
fix(watcher_hub.go) decrease count when remove a watcher
2013-12-28 15:51:16 +08:00
Xiang Li
d66dc3c1c7
refactor(watcher_hub.go) refactor notifyWatchers()
2013-12-28 15:49:05 +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
715b4d7bfc
Merge pull request #408 from xiangli-cmu/compareAndDelete
...
Compare and delete
2013-12-25 13:16:27 -08:00
Xiang Li
bfa7d54b02
refactor(store.go) handle short condition first
2013-12-25 19:01:04 +08:00
Brandon Philips
e1d909eb0e
test(store/event_test): add a test for a full queue
2013-12-22 15:42:51 -08:00
Brandon Philips
317b34f4a0
refactor(store/event_history): cleanup some comments
2013-12-22 15:42:10 -08:00
Xiang Li
0937b4d266
refactor(event_history.go) remove the extra logic
2013-12-22 15:42:10 -08:00
Xiang Li
ef988020b7
fix(event_history) fix a bug in event queue
2013-12-22 15:42:10 -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
Xiang Li
dba5eb57cf
fix(store.go) report node.path
2013-12-12 10:12:33 -08:00
Xiang Li
a5bca025b1
fix index inconsistence in v1 api
2013-12-11 11:12:39 -08:00
Xiang Li
f83e76eb60
Merge https://github.com/coreos/etcd into fix_expire_notify
2013-12-10 15:18:00 -08:00
Xiang Li
06473ba6fe
fix(store.go) expire should also notify all the watchers under the path
2013-12-10 15:17:13 -08:00
Xiang Li
dd354c9e22
Merge pull request #376 from xiangli-cmu/dir_flag
...
feat add dir_flag
2013-12-09 08:34:57 -08:00
Xiang Li
59e98fcc62
doc fix grammar issue
2013-12-09 11:33:55 -05:00
Brian Waldon
0fb8fc0b8d
fix(v2): Drop prevValue from exported fields
2013-12-06 11:46:23 -08:00
Xiang Li
0762c79e2e
refactor remove unused const
2013-12-05 21:04:00 -05:00