Xiang Li
53084ebead
etcd: fix refresh feature
...
When using refresh, etcd store v2 watch is broken. Although with refresh
store should not trigger current watchers, it should still add events into
the watchhub to make a complete history. Current store fails to add the event
into the watchhub, which causes issues.
2016-05-25 13:33:31 -07:00
Gyu-Ho Lee
ef44f71da9
*: update LICENSE header
2016-05-12 20:51:48 -07:00
Gyu-Ho Lee
64e182c69e
store: clean up event.go, node.go and add tests
...
Updates IsCreated logic on event.go. Cleans up node.go
and adds tests to it.
2015-12-25 13:25:12 -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
84be7c1e9e
etcdserver/store: clone Events before modifying
2014-10-29 11:54:35 -07:00
Jonathan Boulle
7a4d42166b
*: add license header to all source files
2014-10-17 15:41:22 -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
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
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
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
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
e2fa89d554
merge compareAndDelete
2013-12-19 22:19:49 +08:00
Xiang Li
a5bca025b1
fix index inconsistence in v1 api
2013-12-11 11:12:39 -08:00
rick
171072c736
add the CompareAndDelete command
2013-11-30 16:24:23 -07:00
rick
90a8f56c96
add compareAndDelete event action
2013-11-30 10:08:25 -07:00
Xiang Li
67b4c27d5d
refactor change node_repr to node_extern
2013-11-28 21:34:38 -05:00
Xiang Li
b7d07ea5c8
refactor event
2013-11-28 11:33:40 -05:00
Xiang Li
8b2e1025ef
style remove the extra space
2013-11-11 21:19:30 -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
Xiang Li
b852a746ce
refactor move http status logic to server.go
2013-10-20 10:21:54 -07:00
Xiang Li
acbc0c8846
refactor return http status 201 Created when creating a new node
2013-10-19 19:57:36 -07:00
Xiang Li
28722e2127
fix v1 handler: use create command when test against prevexistence
2013-10-16 23:57:42 -07:00
Xiang Li
fbf40fb74a
refactor store.go add set function
2013-10-14 23:04:21 -07:00
Xiang Li
9ebdcb8ae3
refactor change testAndSet to CompareAndSwap
2013-10-14 22:32:22 -07:00
Xiang Li
0c5808eeec
fix server/server.go accept name when creating a when server; gofmt
2013-10-13 10:44:40 -07:00
Ben Johnson
8670e1b7aa
Refactored.
2013-10-12 15:56:43 -06:00
Xiang Li
c3e2332479
refactor separate kvpair to kvpair.go; simplify sorting interface
2013-10-08 21:25:56 -07:00
Xiang Li
baaaf24f70
(feat) v1 apt backward support
2013-10-06 11:23:52 -07:00
Xiang Li
512dede9ce
finish todo
2013-10-02 22:15:12 -07:00
Xiang Li
9412c86b97
fix wrong logic in event.go
2013-09-30 23:51:47 -07:00
evan-gu
974d74befb
add some comment and change a declaration form
2013-10-01 01:25:45 -04: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
evan-gu
b8ac1d082b
fix race between Expire() and others, fix UpdateTTL(), modified watcher to catch Expire()
2013-09-30 22:10:40 -04:00
evan-gu
0959448855
add LastIndex and LastTerm in EventHistory
2013-09-30 12:18:28 -04:00
evan-gu
35724319c9
add watcher for expiration, add expiration for TestAndSet, add related test case
2013-09-30 01:06:18 -04:00
Xiang Li
33e010ebd8
add watchHistory clone
2013-09-28 17:41:02 -07:00
Xiang Li
da83ee223b
clean up from yifan
2013-09-28 16:26:19 -07:00