Xiang Li
2f96a68a20
etcdserver: do not send v2 sync if ttl keys do not exist
2016-12-07 14:48:15 -08:00
sharat
754b9025c4
store: removed duplicate method call for the same method
...
the get func was calling path's Join and clean method which is already
being in internalGet(nodePath) func. Hence the func was getting called
unnecessarily twice which is not needed.
#6295
2016-08-30 00:44:53 +05:30
Xiang Li
df56f9d6f9
store: copy old value when refresh + cas
2016-06-15 15:32:58 -07:00
Xiang Li
6acb3d67fb
Merge pull request #5448 from xiang90/fix_refrsh
...
etcd: fix refresh feature
2016-05-26 09:53:13 -07:00
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
mqliang
ffd3cb78d4
store: use Rlock when GET
2016-05-24 17:13:29 +08:00
Gyu-Ho Lee
ef44f71da9
*: update LICENSE header
2016-05-12 20:51:48 -07:00
Gyu-Ho Lee
fb85da92e8
*: fix based on gosimple and unused
2016-04-07 23:16:37 -07:00
Anthony Romano
bd832e5b0a
*: migrate Godeps to vendor/
2016-03-22 17:10:28 -07:00
Hongchao Deng
dcaf5ef586
move store recorder to 'mock/mockstore'
2016-03-15 15:41:07 -07:00
Anthony Romano
c5b51946eb
*: exported godoc fixups
2016-02-21 20:36:44 -08:00
Caleb Champlin
82778ed478
Add refresh parameter to allow TTL refreshes without firing watch/wait responses
2016-02-08 10:37:37 -07:00
Anthony Romano
20461ab11a
*: fix many typos
2016-01-31 21:42:39 -08:00
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