[MIG-699] Add wrapper around cached client that waits for cache to catch up before returning from Create
, Update
#1035
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
This cache sync approach is block-on-write. I wrote about a block-on-read approach in #1034, but I don't think that will work with deletions
See #1034 for problem statement.
Describe the solution you'd like
Add a wrapper around cached client. When
Create
orUpdate
is called, wait until the cache catches up by performingGet
calls against the cache to verify that the new resourceVersion is retrievable from the cache.Have some sane timeout like 3 seconds on this block in case a resource that was modified by us was immediately deleted and will never show up in the cache.
Also, we could provide a parameter on client calls so that the user can decide whether to block on cache sync. This would be useful if we know we won't be looking for a resource later on, but would potentially be unsafe.
The text was updated successfully, but these errors were encountered: