Commit Graph

45 Commits

Author SHA1 Message Date
Andy Goldstein
049e63d253 Honor starting resourceVersion in watch cache
Compare the requested resourceVersion to each event's resourceVersion to ensure events that occurred
in the past are not sent to the client.
2016-04-14 09:37:22 -04:00
Daniel Smith
4c539bf082 Merge pull request #23490 from wojtek-t/remove_set_from_storage_interface
Remove Set() from storage.Interface.
2016-04-13 14:22:05 -07:00
Jordan Liggitt
ada60236f7 Make watch cache behave like uncached watch 2016-04-12 10:14:07 -04:00
Wojciech Tyczynski
53f433f019 Remove Set() from storage.Interface. 2016-04-04 17:54:18 +02:00
Chao Xu
31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00
Russ Cox
e4b369e1d7 storage: clean up timer in cacheWatcher.add
In the e2e benchmarks, this timer is a significant source of garbage
and stale timers. Because the timer is not stopped after its use
in the select, it stays in the timer heap until it eventually fires
(5 seconds later). Under load, a lot of 5-second timers can pile up
before any start going away. The timer heap being large makes timer
operations take longer; the operations are O(log N) but N is still big.

The way to fix this in current versions of Go is to stop the underlying
timer explicitly, which this CL does for this one case.

There are many other places in the code that use the same idiom,
but those do not show up on profiles of the e2e server.
I am investigating changes for Go 1.7's runtime that would make
the old code behave like this new code transparently, so I don't
think it's worth updating any uses of the idiom that are not in
hot spots found with profiling.

Measuring 'LIST nodes' latency in milliseconds during e2e test
shows the benefit of this change.

Using Go 1.4.2:

BEFORE  p50: 148±7   p90: 328±19  p99: 513±29  n: 10
AFTER   p50: 151±8   p90: 339±19  p99: 479±20  n: 9

Using Go 1.6.0:

BEFORE  p50: 141±9   p90: 383±32  p99: 604±44  n: 11
AFTER   p50: 140±14  p90: 360±31  p99: 483±39  n: 10
2016-03-18 15:58:34 -04:00
Daniel Smith
3fb020b28d Fix a locking bug in the cacher. 2016-02-19 17:45:02 -08:00
Daniel Smith
74400c33ae changes for cross-group moves 2016-02-15 21:39:00 +01:00
Daniel Smith
4e85d42f99 fix logging every microsecond when etcd goes down 2016-02-09 00:12:19 -08:00
Jan Chaloupka
4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
Daniel Smith
26683fda29 add timeout to cacher 2016-02-01 15:36:15 -08:00
Chao Xu
ebcff4b5e4 fix the namespaceScoped of cachers 2016-01-28 16:24:54 -08:00
Wojciech Tyczynski
60fc2bc09e Fix cacher_test flake 2015-12-31 07:53:41 +01:00
Wojciech Tyczynski
65696989b2 Extend logging for debugging 18928 2015-12-30 20:09:05 +01:00
Wojciech Tyczynski
05b60a30cf Fix flakes in cacher_test 2015-12-28 15:28:07 +01:00
Wojciech Tyczynski
ec70eb16f3 Graceul termination in Cacher 2015-12-28 10:54:21 +01:00
Timothy St. Clair
c505a5d49d Updating kubernetes proper to use latest etcd client library 2015-12-16 15:56:35 -06:00
Wojciech Tyczynski
960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
Wojciech Tyczynski
0cefb43707 Enable listing from memory 2015-12-09 16:24:14 +01:00
Wojciech Tyczynski
0369805308 Merge pull request #18207 from wojtek-t/string_resource_version
Change resourceVersion to string in storage.Interface
2015-12-09 15:00:54 +01:00
Wojciech Tyczynski
b0fcb5adef Pass ListOptions to List in ListWatch. 2015-12-07 11:53:53 +01:00
Wojciech Tyczynski
793da62c7f Change resourceVersion to string in storage.Interface 2015-12-07 09:22:59 +01:00
Wojciech Tyczynski
b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
feihujiang
ad79fa6e84 Move list functions from runtime to meta package 2015-11-20 09:20:55 +08:00
Wojciech Tyczynski
a5a8717539 Pass versioner to cacher. 2015-11-13 08:35:28 +01:00
Daniel Smith
45a1ec73bb Lengthen delay 2015-11-06 13:03:58 -08:00
Wojciech Tyczynski
b6a775ca50 Terminate watcher if it is full 2015-11-06 13:40:21 +01:00
Wojciech Tyczynski
8f385c563f Refactor code for creating Cacher. 2015-11-02 20:56:46 +01:00
Wojciech Tyczynski
652fb090eb Initial support for listing from in-memory cache. 2015-10-30 20:58:13 +01:00
k8s-merge-robot
d5be3635e5 Merge pull request #16273 from wojtek-t/list_options_in_api
Auto commit by PR queue bot
2015-10-29 01:57:29 -07:00
Wojciech Tyczynski
aa30e38183 Pass resource version to storage List operation. 2015-10-27 10:03:58 +01:00
Wojciech Tyczynski
d47e21f19f Reuse TCP connections in Reflector between resync periods. 2015-10-26 19:35:25 +01:00
Timothy St. Clair
2a2a2d79ff New etcd client modifications part 1 (context support)
This commit plumbs contexts which are needed for the new client.
2015-10-12 08:45:49 -05:00
k8s-merge-robot
647288cde1 Merge pull request #13734 from wojtek-t/filter_in_storage
Auto commit by PR queue bot
2015-09-14 17:25:40 -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
Wojciech Tyczynski
ed7d6ebd71 Filter List in Storage level to avoid additional copies. 2015-09-10 09:49:50 +02:00
Wojciech Tyczynski
d318b22f65 Move WatchCache to pkg/storage 2015-08-31 09:49:12 +02:00
Wojciech Tyczynski
a12b7edc42 Fix deadlock in Cacher on etcd error 2015-08-26 08:02:21 +02:00
Wojciech Tyczynski
ec6556987e Switch on Cacher for pods, endpoints and nodes. 2015-08-21 09:24:49 +02:00
Wojciech Tyczynski
03413ddb4a Merge pull request #12782 from wojtek-t/cacher_deadlock
Fix deadlock in the cacher
2015-08-20 08:27:15 +02:00
Wojciech Tyczynski
90bf334fd1 Fix deadlock in the cacher 2015-08-19 08:17:25 +02:00
Jian Huang
c350d325e9 Solve Static Check Error 2015-08-19 13:38:56 +08:00
Kris Rousey
ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Wojciech Tyczynski
3a71eb1bcc Store previous value in WatchCache for filtering 2015-08-18 09:33:34 +02:00
Wojciech Tyczynski
e424da7d0d Implement Cacher for watch in apiserver 2015-08-14 09:44:42 +02:00