358 Commits

Author SHA1 Message Date
Gyu-Ho Lee
5a154e8e2b *: disable gRPC client logs in tests
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-11 20:56:00 -08:00
Gyu-Ho Lee
75110dd839 *: fix naked returns
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 18:46:15 -08:00
Gyu-Ho Lee
5cea18baf1 store: silence server logs in v2v3 store tests
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-08 13:22:00 -08:00
Gyu-Ho Lee
f6ca686882 store/stats.go: fix gofmt warnings
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-02 14:18:00 -07:00
Gyu-Ho Lee
0199bdc266 *: fix 'ineffassign' issues
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-03 10:14:33 -07:00
Gyu-Ho Lee
0b2d8a6c96 *: fix minor typos
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-11 07:33:35 -07:00
Anthony Romano
75eb05a272 store: test v2v3 store
Changes main store tests to use a timeout select instead of expecting
events to be immediately posted before returning.
2017-08-31 11:47:41 -07:00
Anthony Romano
cab7572b00 store: separate tests that need Store from those needing *store 2017-08-31 11:47:40 -07:00
Anthony Romano
978cf804ca store: replace testify asserts with testutil asserts 2017-04-22 20:29:58 -07:00
Anthony Romano
14d6ed9e5f *: clear redundant return statement warnings (S1027) 2017-04-21 14:01:00 -07:00
Gyu-Ho Lee
3d75395875 *: remove never-unused vars, minor lint fix
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-06 14:59:12 -08:00
焦龙
99639186cd store: set Dir attribute, when node expired 2017-01-19 18:00:56 +08:00
Xiang Li
2f96a68a20 etcdserver: do not send v2 sync if ttl keys do not exist 2016-12-07 14:48:15 -08:00
Xiang Li
c4e5081562 Merge pull request #6943 from m1093782566/fix-store-test-comments
store: fix store_test.go comments
2016-12-06 16:54:36 -08:00
m1093782566
9603d5e31f store: fix store_test.go comments 2016-12-06 09:31:59 +08:00
m1093782566
5f2b5e8b9d store: check sorted order in TestStoreGetSorted 2016-12-01 10:36:23 +08:00
Gyu-Ho Lee
5b8300f08b store: type-assert int64 for assert tests 2016-11-09 15:59:47 -08:00
Xiang Li
43045500b2 store: do not modify key during scanning 2016-11-01 14:35:53 -07:00
Xiang Li
f4c30425c0 Merge pull request #6298 from sinsharat/master
store: added missing test case scenerio for scan of de-queued entries
2016-08-29 13:55:55 -07: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
sharat
4f150b06e5 store: added missing test case scenerio for scan of de-queued entries
Test case added to check err handing for replaced entries.

#6255
2016-08-30 00:30:48 +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
Xiang Li
67645095e9 *: add debugging metrics 2016-04-26 09:52:56 -07:00
Gyu-Ho Lee
89f8e66682 *: fixes based on ineffassign 2016-04-13 10:41:58 -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
Gyu-Ho Lee
445ff6970b store: fix to 'go vet' errors
This check has been introduced to go tip [1]. Just fixes by calling
the Index method.

[1]: 0f89efa255
2016-01-30 17:53:58 -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
Xiang Li
547250321b store: handle watch dir removal correctly 2016-01-11 22:42:56 -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
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