Commit Graph

165 Commits (e39ad84440cd03005f6c035e001dc14d8b113a64)

Author SHA1 Message Date
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 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 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 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
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
Xiang Li dba5eb57cf fix(store.go) report node.path 2013-12-12 10:12:33 -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 d646d7c16a tests add tests for dir flag 2013-12-05 20:46:52 -05:00
Xiang Li b556252358 tests fix all tests 2013-12-05 17:48:32 -05:00