Gyu-Ho Lee
04ac8969a1
Merge pull request #3986 from mqliang/defer
...
refactor store/store.go
2015-12-29 14:42:11 -07:00
Gyu-Ho Lee
b072f0b048
store: fix expiration var shadowing, change test function names
...
Found at https://travis-ci.org/coreos/etcd/jobs/99087279#L298 .
And changes test function names to make them clear.
2015-12-28 08:50:34 -08: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
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
a45b902d12
store: fixes shadowed variables with go tool vet.
...
Fixes for https://github.com/coreos/etcd/issues/3954 .
2015-12-12 09:38:26 -08:00
Xiang Li
d7a027e476
store: fix data race when modify event in watchHub.
...
The event got from watchHub should be considered as readonly.
To modify it, we first need to get a clone of it or there might
be a data race.
2015-12-09 10:11:51 -08:00
Gyu-Ho Lee
81229dbea9
*: add missing package descriptions
...
This adds and updates package descriptions in etcd projects.
And also deletes some duplicate LICENSE statements.
2015-11-17 20:54:10 -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
Brandon Philips
fb1951204c
etcdserver: move atomics to make etcd work on arm64
...
Follow the simple rule in the atomic package:
"On both ARM and x86-32, it is the caller's responsibility to arrange
for 64-bit alignment of 64-bit words accessed atomically. The first word
in a global variable or in an allocated struct or slice can be relied
upon to be 64-bit aligned."
Tested on a system with /proc/cpuinfo reporting:
processor : 0
model name : ARMv7 Processor rev 1 (v7l)
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3
tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc0d
CPU revision : 1
2015-08-08 18:11:41 -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
999917010d
store: fix watcher removal
2015-04-03 10:13:43 -07:00
招牌疯子
afed8cf044
store: fixed clone error for store stats.
2015-03-20 12:31:47 +08: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
Barak Michener
92dca0af0f
*: remove shadowing of variables from etcd and add travis test
...
We've been bitten by this enough times that I wrote a tool so that
it never happens again.
2015-02-17 16:31:42 -05:00
Xiang Li
9776e6d082
store: fix modifiedindex in node clone
2015-02-05 22:26:52 -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
Yicheng Qin
c104ca89c2
store: optimize ttlKeyHeap GC
...
It helps to recycle nodes in heap array, whose value can be unlimited
long.
2015-01-20 12:01:57 -08:00
Xiang Li
773f112a5d
store: return utc time to user
2014-12-11 16:24:33 -08:00
Xiang Li
793cb095b0
store: fix race in watcher_hub
...
Get the lock before modifing the global objects in the hub.
2014-12-05 12:09:48 -08:00
Yicheng Qin
a910d8ba9f
store: copy Nodes correctly in NodeExtern.Clone
2014-10-29 16:54:09 -07: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
1456ae4453
store: restore minExpireTime check and advance FakeClock appropriately
2014-10-17 10:05:29 -07:00
Jonathan Boulle
e0801360d3
godep: update clockwork dependency
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
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