65 Commits

Author SHA1 Message Date
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
1b5f9eb013 test (isHidden) add unit test for isHidden function 2014-02-05 23:32:12 -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
Brandon Philips
d7d20d1c3d bump(github.com/stretchr/testify): 9cc77fa25329013ce07362c7742952ff887361f2 2014-02-02 16:57:36 -08:00
Cenk Alti
354a91290e feat(prevNode): add test for prevNode 2014-01-29 17:52:25 -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
641edd4e6e test(store): group together all store tests that deal with hidden keys 2014-01-22 09:29:53 -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
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
5e499456f0 init cancel watcher 2013-12-26 22:06:15 +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
59e98fcc62 doc fix grammar issue 2013-12-09 11:33:55 -05:00
Xiang Li
d646d7c16a tests add tests for dir flag 2013-12-05 20:46:52 -05:00
Xiang Li
e00296960c test fix tests 2013-12-05 18:16:01 -05:00
Xiang Li
b556252358 tests fix all tests 2013-12-05 17:48:32 -05:00
Xiang Li
c6e1af8321 merge master 2013-12-02 22:36:38 -05:00
Xiang Li
b929e71948 tests add root readonly test 2013-12-01 18:16:32 -05:00
rick
d2d7e37990 implement recursive for CompareAndDelete in the store 2013-12-01 13:38:09 -07:00
rick
f8985d731f keep the Delete tests together 2013-12-01 13:28:14 -07:00
rick
90a8f56c96 add compareAndDelete event action 2013-11-30 10:08:25 -07:00
rick
702cf1cc36 teach store.Store about CompareAndDelete 2013-11-30 10:02:03 -07:00
Xiang Li
b7d07ea5c8 refactor event 2013-11-28 11:33:40 -05:00
Xiang Li
5abbaf59e3 Merge pull request #292 from xiangli-cmu/fix-ttl
WIP: fix ttl
2013-11-11 21:30:32 -08:00
Xiang Li
811c577fe8 test stop mockSync goroutines 2013-11-11 21:31:12 -08:00
Xiang Li
06f1b7f2e8 refactor change Index to modifiedIndex 2013-11-09 20:49:19 -08:00
Xiang Li
6156d5c790 refactor separate etcd index from raft index 2013-11-09 17:55:54 -08:00
Brandon Philips
6a074d4f6f chore(*.go): add copyright notice 2013-11-08 14:04:15 -08:00
Xiang Li
c307b6abca fix watcher_hub 2013-11-06 21:19:37 -08:00
Xiang Li
797d996535 init sync to delete expiring keys 2013-11-05 21:47:25 -08:00
Xiang Li
ec175d4c47 test add test for ttl in kv pair 2013-10-28 09:42:54 -07:00
Ben Johnson
23119d1672 Refactor store tests. 2013-10-20 16:09:45 -06:00
Xiang Li
0392c18794 refactor put_handler.go 2013-10-15 23:18:03 -07:00
Xiang Li
c5f9afa0e8 fix store test 2013-10-14 23:15:31 -07:00
Xiang Li
9ebdcb8ae3 refactor change testAndSet to CompareAndSwap 2013-10-14 22:32:22 -07:00
Xiang Li
545f8ed6a1 fix update PUT handler 2013-10-14 22:22:23 -07:00
Ben Johnson
1321c63f3b Extract Store into an interface. 2013-10-14 11:12:30 -06:00
Xiang Li
b0793e2dd9 refactor create do not need to check existence first 2013-10-12 21:48:29 -07:00
Xiang Li
a71838a59b refactor watcher.go 2013-10-07 22:17:58 -07:00
Xiang Li
baaaf24f70 (feat) v1 apt backward support 2013-10-06 11:23:52 -07:00
Xiang Li
b8b81d5b03 feat(store) create node with incremental suffix. accept #190 in new API 2013-10-03 08:59:05 -07:00
Xiang Li
558d30f33f simplify lock 2013-09-30 23:18:52 -07:00
evan-gu
6f591032ef rename to DupCnt, duped; add some comments, maintained some format, add notification for immediate expiration 2013-10-01 00:35:44 -04:00