Commit Graph

37 Commits

Author SHA1 Message Date
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Wojciech Tyczynski
5d702a32c1 Fix race in informer 2016-06-14 16:40:12 +02:00
Wojciech Tyczynski
051fca3c79 Fix govet error in reflect_resync test 2016-05-23 12:50:46 +02:00
Wojciech Tyczynski
71726a8ad0 Fix reflector test 2016-05-23 12:07:11 +02:00
Piotr Szczesniak
d92c151fec Merge pull request #26013 from xiang90/fix_test
cache: fix flaky resync test
2016-05-23 09:23:26 +02:00
Xiang Li
abbbd7c2f2 cache: reflector should never stop watching
A recent change tries to separate resync and relist. The motivation
was to avoid triggering relist when a resync is required.

However, the change is not effective since it stops the watcher. As hongchao
mentioned in the original comment, today's storage interface will not deliever
any progress notification to the watch chan. So any watcher that does not receive
events for the last few seconds will not be able to catch up from the previous
index after a hard close since the index of the last received event is out of
the cache window inside etcd2.

This pull request tries to fix this issue by not stoping watcher when a resync is
required.
2016-05-22 18:04:20 -07:00
Xiang Li
f31ec95f05 cache: fix flaky resync test 2016-05-22 10:57:00 -07:00
Robert Rati
e388c137bb Separate sync and list functionality in the reflector. #23394 2016-05-19 07:41:24 -04:00
Jan Chaloupka
4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
k8s-merge-robot
06df5c97e7 Merge pull request #18499 from wojtek-t/fix_reflector_race
Auto commit by PR queue bot
2015-12-15 01:19:06 -08:00
Wojciech Tyczynski
960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
Wojciech Tyczynski
6a7e8861c2 Fix data-race in reflector test in Go 1.5.1 2015-12-14 09:47:45 +01:00
Wojciech Tyczynski
b0fcb5adef Pass ListOptions to List in ListWatch. 2015-12-07 11:53:53 +01:00
Wojciech Tyczynski
b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
Wojciech Tyczynski
d47e21f19f Reuse TCP connections in Reflector between resync periods. 2015-10-26 19:35:25 +01:00
Brendan Burns
77fd388485 Increase a bunch of timeouts to reduce flakes 2015-09-23 11:09:03 -07:00
Kris
f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
Daniel Smith
15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
Kris Rousey
7ba5b058cc Moving client libs to unversioned dir 2015-08-18 10:03:19 -07:00
Wojciech Tyczynski
52e3af4e93 Implement watchCache structure. 2015-08-07 08:29:17 +02:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Daniel Smith
16a6fb8ef7 Replace calls to time.After with time.NewTimer for explicit stopping 2015-05-04 14:29:33 -07:00
Eric Paris
6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Prashanth Balasubramanian
5234c2dc82 Fix RunUntil and stop leaking watch channel on etcd error 2015-04-09 11:03:30 -07:00
derekwaynecarr
9df41301f0 Expose last sync resource version 2015-04-08 17:09:06 -04:00
Daniel Smith
554b1c847c add occasional polling to reflector 2015-02-27 16:59:14 -08:00
Dan Mace
5ee943d683 Support namespacing in cache.Store implementations
Support namespacing in cache.Store by framing the interface functions
around interface{} and providing a key function to each Store implementation.

Implementation of a fix for #2294.
2015-01-29 17:39:49 -05:00
Clayton Coleman
644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman
bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Clayton Coleman
a5462c0678 Change test cases to verify the client sends the received resourceVersion 2014-10-07 19:00:26 -04:00
Clayton Coleman
82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Clayton Coleman
d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Daniel Smith
4d7c6e2657 Treat super short watches with no items received the same as watches that error immediately 2014-09-19 18:09:40 -07:00
Daniel Smith
b1169ed91e Fix cache to use the "List then Watch" pattern. 2014-09-16 16:17:15 -07:00
Daniel Smith
4c4ca59050 Add poller to cache. 2014-08-20 15:32:49 -07:00
Daniel Smith
4c3f509d94 Make cache.Reflector more injectable. Add test for resource version state keeping. 2014-08-20 15:32:49 -07:00
Daniel Smith
041d56f3d0 finish testing client/cache 2014-08-04 14:50:01 -07:00