Skip to content

Commit bcf3757

Browse files
committed
improve
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent 73a335f commit bcf3757

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/content/en/blog/news/primary-cache-for-next-recon.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,20 @@ that would be different, and in general there is no elegant way to determine if
5959
informer receives an event from an update that happened before or after our update.
6060
(Note that informers watch can lose connection and other edge cases)
6161

62+
6263
```mermaid
6364
flowchart TD
6465
A["Update Resource with Lock"] --> B{"Is Successful"}
65-
B -- Fails on conflict --> D["Poll the Informer until resource changes"]
66-
D --> n4["Apply desired changes on the resource"]
66+
B -- Fails on conflict --> D["Poll the Informer cache until resource changes"]
67+
D --> n4["Apply desired changes on the resource again"]
6768
B -- Yes --> n2["Still the original resource in informer cache"]
6869
n2 -- Yes --> C["Cache the resource in overlay cache"]
6970
n2 -- NO --> n3["We know there is already a fesh resource in Informer"]
7071
n4 --> A
7172
7273
```
7374

75+
7476
If we do our update with optimistic locking, it simplifies the situation, we can easily have strong guarantees.
7577
Since we know if the update with optimistic locking is successful, we have the fresh resource in our cache.
7678
Thus, the next event we receive will be the one that is the result of our update

0 commit comments

Comments
 (0)