Jordan Liggitt
b3ad9fb4e3
Generate and format files
...
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh
Replay of a9593d634c6a053848413e600dadbf974627515f
Kubernetes-commit: 15d9d196476d64482189f00f1cf1a2061aea5b35
2022-11-16 11:39:18 -05:00
Wojciech Tyczyński
58b4aa562f
Fix potential race in dispatching watch event
...
Kubernetes-commit: 779f157ecfb24d0ee944f18e481bfa8cc8c94f6f
2022-02-22 17:14:15 +01:00
Wojciech Tyczyński
0b8c9f5ebf
Avoid perfoming deep copies in watchcache if not needed
...
Kubernetes-commit: 0cb3a02bbede2f547ddd20e23e2bbc782ac3956c
2022-02-21 15:18:25 +01:00
Wojciech Tyczyński
b028a2ea8d
Unify merge GetToList and List storage methods to single GetList
...
Kubernetes-commit: f3d56369f71f5106eeec8300e77bd69b172733da
2022-02-10 10:15:29 +01:00
Wojciech Tyczyński
9f8f72fea9
Change storage.Interface to utilize recurisve parameter
...
Kubernetes-commit: 3016b3d8f868a3041c7cb86695de09d7ab27cf3b
2022-02-10 09:58:31 +01:00
Madhav Jivrajani
ffc1b941d4
cacher: Minor cleanup and refactor of code and tests
...
* Remove linter warnings.
* Cancel contexts to avoid leaks.
* Rename a few XXXThreadUnsafe to XXXLocked to
maintain consistency.
* A few are still called XXXThreadUnsafe mainly
because those are safe to be called from the
perspective that only one gorotuine will access
them - not really called under a lock.
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
Kubernetes-commit: c3081b48759db1f05a446f2acca7e05c4511ce2e
2022-02-10 13:44:34 +05:30
Madhav Jivrajani
4f2ee5cf42
cacher: Use watchCacheInterval to reduce lock contention
...
- Modify GetAllEventsSinceThreadUnsafe to return a watchCacheInterval
- Modify Watch() to compute a watchCacheInterval rather than a slice
of all "initEvents" and pass this interval to process()
- Use interval::Next() to obtain events to process rather than obtain
them all at once
- Modify tests accordingly to use interval
- On invalidation, stop processing and stop the watch.
- Make indexValidator injectable for testing
- Add unit test for verifying the behaviour of stopping the watch.
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
Kubernetes-commit: 7f2aa7ad3a61a52d0a780f904b291d063399c28a
2021-10-05 15:52:09 +05:30
Wojciech Tyczyński
067689be43
Graduate EfficientWatchResumption feature to GA
...
Kubernetes-commit: b7257a4d6a3f2382f4753322ec6d3458410b04f9
2021-12-10 10:20:51 +01:00
Wojciech Tyczyński
b4935b065f
Slightly improve reliability of storage List tests.
...
Kubernetes-commit: 8ca6c5922b9a0bafa8c83617d6930b981430334e
2021-12-10 12:05:32 +01:00
Wojciech Tyczyński
0002a597cd
Unify List and GetToList functions of cacher.
...
Kubernetes-commit: c86543d9cb302859510604256fdb81ea1b0d46fb
2021-11-18 16:41:36 +01:00
Wojciech Tyczyński
498feb7a9e
Add watchcache metrics to tracking its progress
...
Kubernetes-commit: ba5e08223d3c199a8efb69248728d41e71d70cd0
2021-11-30 11:12:54 +01:00
Wojciech Tyczyński
71bfcaaea1
Simplify storage.Interface by merging Watch and WatchList functions.
...
Kubernetes-commit: 53653e9b0a7145c3b6e133c5639194ff79b3719d
2021-11-18 12:40:26 +01:00
Madhav Jivrajani
af19f84a96
cacher: refactor process() function
...
Split process() function into processEvents() and process().
This is done in anticipation of GetAllEventsSinceThreadUnsafe()
returning an entity using which events can be constructed and
not the events itself.
Subsequently, this commit also moves updating resource version
for initEvents from Watch() to the processEvents() func.
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
Kubernetes-commit: aab7cd3d8a66f425022ca5b2a2bd0d3019efe526
2021-10-29 14:41:10 +05:30
Dr. Stefan Schimanski
c0ff3feb85
apiserver/watchcache: doc watch event fan-out to blocked watchers better
...
Kubernetes-commit: 94b2bb1d3dcfe7973329cc56024f449adde4086c
2021-10-08 17:05:27 +02:00
Mike Spreitzer
889106eff7
Add metrics about handling LIST requests
...
Add metrics that illuminate the costs of handling LIST requests.
Kubernetes-commit: bf424292db185546c474b27b963fd27bdbafc72f
2021-09-01 18:18:23 -04:00
wojtekt
b898581360
Migrate to k8s.io/utils/clock in apiserver
...
Kubernetes-commit: 859a98c0358610e2c127cd2fba1be601ca975188
2021-09-14 20:36:07 +02:00
Abu Kashem
bd2ef9810a
apf: estimate list width
...
Kubernetes-commit: 296c18ec323328bf1c6a621a9ca3a094d78bb9d0
2021-06-22 19:38:00 -04:00
Antonio Ojea
42a99cd0a2
decouple timeBudget from real clock
...
instead of using a goroutine refreshing the budget, obtain
the value from the last time the budget was accessed.
Kubernetes-commit: dd2c38306000eeb1720afc8346165a6caab09259
2021-07-20 13:54:59 +02:00
wojtekt
cd8b524e3f
Avoid code duplication in watchcache
...
Kubernetes-commit: 2df05df6982df93e4ced37d1236f0366069d5838
2021-07-07 09:40:58 +02:00
wojtekt
5290a24345
Implement support for watch initialization in P&F
...
Kubernetes-commit: 0cc217647ca8be0820973b970124a072c27b6575
2021-05-07 12:49:06 +02:00
Maciej Borsz
5d1582cdd6
Print queue lengths on watch termination
...
Kubernetes-commit: 8f8beeabb7deb04624c70444012ebc8ba59d990f
2021-01-20 09:32:00 +01:00
Maciej Borsz
8313c177f0
Improve logging in cacheWatcher
...
Kubernetes-commit: b78f0b31063b7d47781a1ce9ee4ed6c118fb949f
2021-01-11 12:33:52 +01:00
Maciej Borsz
255da953aa
Add 'apiserver_terminated_watchers_total'
...
Kubernetes-commit: 342ad48feb2629ebc832c0b85c52b4eb04d81498
2021-01-08 10:55:44 +01:00
wojtekt
3de94d4883
Unify variable naming between GuaranteedUpdate and Delete in storage
...
Kubernetes-commit: d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
2020-12-16 09:28:44 +01:00
wojtekt
ddcc69d4f7
Use current state from watchcache to avoid etcd get for deletions
...
Kubernetes-commit: 7bab6a9c6ed7d4e54da3e010a7bf0a30786d28f9
2020-11-03 17:30:26 +01:00
wojtekt
8c25869e43
Add suggestion to storage interface Delete method
...
Kubernetes-commit: c2d61896f45967cdea15072b7a12faeb635b5dc5
2020-11-03 13:21:00 +01:00
chenyw1990
e6daad296e
Fix cacheWatcher leak when time jump to the future and jump back
...
Kubernetes-commit: 36d5db95f8598bc64071c663c6f44a453c662102
2020-11-05 22:02:41 +08:00
wojtekt
942f220e85
Remove variadic argument from storage interface
...
Kubernetes-commit: 8b98305858b107369f2c9b9fd8ef1c5b0da078c0
2020-11-02 15:52:51 +01:00
wojtekt
e0edc885d5
Fix cacher test flakiness
...
Kubernetes-commit: 6eb71c4089f69c7cc35ef2fd13bba4329b5716b9
2020-10-26 15:29:51 +01:00
wojtekt
cdc93483b8
Watch bookmarks may contain version of objects of other types
...
Kubernetes-commit: 0bd8104809922aae504fc9be2e853650ecd17b8a
2020-09-29 12:27:20 +02:00
wojtekt
c4fb001eda
Enable progress notify events in watchcache
...
Kubernetes-commit: a94fb5369d5e77b3fcafd1296bac072a1d6e13fe
2020-08-31 13:15:36 +02:00
Joe Betz
97937c66f2
Revert nested trace PR#88936
...
Kubernetes-commit: 02cf58102a61b6d1e021e256381ff750573ce55d
2020-07-20 09:55:05 -07:00
Joe Betz
7a467399ac
Enable nested tracing, add request filter chain tracing incl. authn/authz tracing
...
Kubernetes-commit: b12ac0abc64adb71d97fbde12f373b1424631f20
2020-03-06 16:11:21 -08:00
Joe Betz
ee219411ed
Add ResourceVersionMatch parameter to make Resource Version semantics consistent for list
...
Kubernetes-commit: e214f2408b59c745c199645547948a8ad2a87ac2
2020-05-29 10:44:26 -07:00
wojtekt
8a4e4b61c9
Add initialization logs to watchcache
...
Kubernetes-commit: 34b2cf7d2e1c09e10d97ec83e413c41ea7364d80
2020-06-18 13:55:23 +02:00
gongguan
5dbb27a1df
remove deprecated cacher CacheCapacity config
...
Kubernetes-commit: 12c838136b09005e0cbc831096643195ef24cb89
2020-06-05 21:34:36 +08:00
gongguan
1da8aeae17
improve Clock as Cacher Config
...
Kubernetes-commit: 0f7de876a5e931a57ba6347b81e8e28d360c788a
2020-06-15 23:57:11 +08:00
Wojciech Tyczynski
54e40d4b2d
Revert "Revert "Rely on default watch cache capacity and ignore its requested size""
...
Kubernetes-commit: 7787ebc85b87eb7bc00f234f4e52eed3d987d5dd
2020-05-27 14:19:38 +02:00
Joe Betz
5b75cf0ff9
Add GetOptions and ListOptions to storage interface
...
Kubernetes-commit: 4c99949ae6b4a74e4ffda0caba86c151c23d579e
2020-05-29 10:48:33 -07:00
Jordan Liggitt
d501f7b597
Revert "Rely on default watch cache capacity and ignore its requested size"
...
This reverts PR 91260
Kubernetes-commit: 6249f287e1d3d9fb63b60961c8625a82d7db360e
2020-05-23 09:21:22 -04:00
wojtekt
31ffec3302
Rely on default watch cache capacity and ignore its requested size
...
Kubernetes-commit: 99dff90d613e2014873dc2fae0a00acaf95c3bd2
2020-05-19 18:13:28 +02:00
Davanum Srinivas
5879417a28
switch over k/k to use klog v2
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Kubernetes-commit: 442a69c3bdf6fe8e525b05887e57d89db1e2f3a5
2020-04-17 15:25:06 -04:00
wojtekt
6332f98216
Update duration to be kept in watchcache
...
Kubernetes-commit: d1de6295bb8047cbfd2a4ecbb0d264197f4cd8a4
2020-05-04 17:21:40 +02:00
Wojciech Tyczynski
4589c74d5e
Send watch bookmarks every minute
...
Kubernetes-commit: 9f1e4620379028754f2da4223adf4d1a445e90f4
2020-04-27 18:41:31 +02:00
Wojciech Tyczynski
7686f3528b
Revert "Send watch bookmarks every minute"
...
Kubernetes-commit: 1cb98ed2376b1f7777ca3d7bfac98cbb5f8b9ce3
2020-04-27 17:07:27 +02:00
wojtekt
f1c77ba823
Send watch bookmarks every minute
...
Kubernetes-commit: d4b532e7190c2ad12a0317ff946e2cd0b33f0ada
2020-04-17 19:42:26 +02:00
louisgong
4c8b97679c
Use dynamic size watch-cache.
...
If all cached events occur inside eventFreshDuration, increase cache capacity by 2x.
Decrease cache capacity by 2x when recent half events occur outside eventFreshDuration.
Kubernetes-commit: 56407b656c7acf6039cead0192070429e53a0c70
2020-04-12 17:22:38 +08:00
louisgong
1117ccdc72
move watchCache metrics to a seperate file
...
Kubernetes-commit: 21ba510ef0e02f64a813cb460212cb832f8f4d78
2020-04-16 15:45:16 +08:00
shaloulcy
6099d76e39
add indexer for storage cacher
...
Signed-off-by: shaloulcy <lcy041536@gmail.com>
Kubernetes-commit: 87582e2c3c1cb8c8e10ec05a4700f865c759b7b2
2019-11-19 16:52:07 +08:00
wojtekt
a76d249b96
Tweak use of caching objects
...
Kubernetes-commit: c5170dfb66749b60a4a1611dc7b4a39e64b33e2e
2019-10-16 09:05:13 +02:00