Commit Graph

22 Commits (0461b3fa51ebcd3f72ef54296638ac2f19ea9071)

Author SHA1 Message Date
lorneli 54fcdb4b5c pkg/wait: change list's lock to RWMutex
Change list's lock from Mutex to RWMutex, which allows concurrent
access for list.IsRegistered function.
2017-08-27 18:23:18 +08:00
Xiang Li d818ef2c76 pkg/wait: add comment and make List private 2017-04-27 13:25:02 -07:00
Xiang Li 83de13e4a8 etcdserver: support apply wait 2016-08-19 16:18:35 -07:00
Xiang Li 8db4f5b8e1 pkg/wait: change wait time to use logical clock 2016-08-19 15:10:37 -07:00
Anthony Romano f9d122066e pkg/wait: don't expect time.Now() to be strict increasing in WaitTime tests 2016-08-17 11:53:34 -07:00
Anthony Romano c3f069c9fc wait: make WaitTime robust against deadline collisions 2016-08-15 14:38:41 -07:00
Hitoshi Mitake abb20ec51f etcdserver, pkg: skip needless log entry applying
This commit lets etcdserver skip needless log entry applying. If the
result of log applying isn't required by the node (client that issued
the request isn't talking with the node) and the operation has no side
effects, applying can be skipped.

It would contribute to reduce disk I/O on followers and be useful for
a cluster that processes much serializable get.
2016-07-08 15:16:45 +09:00
Gyu-Ho Lee 8b77de4e99 pkg: update LICENSE header 2016-05-12 20:48:53 -07:00
Hongchao Deng dcaf5ef586 move store recorder to 'mock/mockstore' 2016-03-15 15:41:07 -07:00
Xiang Li d43bd48977 pkg/wait: make id checking stricter
Do not allow register with same id.
2016-02-04 09:59:49 -08:00
Gyu-Ho Lee 71c2a9bb3c *: fix minor typos, comments 2016-01-30 18:15: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 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
Yicheng Qin 3b8349c06e pkg/wait: extend wait timeout in TestWaitTime
Fix this error happening on travis:
```
--- FAIL: TestWaitTime-2 (0.01s)
		wait_time_test.go:46: cannot receive from ch as expected
```
2015-11-04 11:18:17 -08:00
Jonathan Boulle 7848ac3979 *: add missing license headers 2015-09-15 14:09:01 -07:00
Yicheng Qin eea7f28be4 pkg/wait: extend timeout to check closed channel
It is possible to trigger the time.After case if the timer went off
between time.After setting the timer for its channel and the time that
select looked at the channel. So it needs to be longer.

refer: https://groups.google.com/forum/#!topic/golang-nuts/1tjcV80ccq8
2015-06-25 10:43:12 -07:00
Yicheng Qin 256a7cfe8c pkg/wait: fix TestWaitTestStress
The test may fail if two consequent time.Now() returns the same value.
Sleep 1ns to avoid this situation.
2015-05-13 13:41:34 -07:00
Xiang Li a560c52815 Merge pull request #2354 from xiang90/wait_time
pkg/wait: add WaitTime
2015-02-23 14:29:39 -08:00
Xiang Li 53d20a8a29 pkg/wait: add WaitTime
WaitTime waits on deadline instead of id.
2015-02-23 14:26:42 -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
Xiang Li 0d18a0f381 pkg/wait: move wait to pkg/wait 2014-11-13 09:11:53 -08:00