You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/cache/BoundedItemStore.java
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -121,14 +121,19 @@ protected R refreshMissingStateFromServer(String key) {
121
121
varnewRes = resourceFetcher.fetchResource(key);
122
122
synchronized (this) {
123
123
log.debug("Fetched resource: {}", newRes);
124
+
varactual = cache.get(key);
124
125
if (newRes == null) {
125
-
existingMinimalResources.remove(key);
126
+
// double-checking if actual, not received since.
127
+
// If received we just return. Since the resource from informer should be always leading,
128
+
// even if the fetched resource is null, this will be eventually received as an event.
129
+
if (actual == null) {
130
+
existingMinimalResources.remove(key);
131
+
}
126
132
returnnull;
127
133
}
128
134
// Just want to put the fetched resource if there is still no resource published from
129
135
// different source. In case of informers actually multiple events might arrive, therefore non
130
136
// fetched resource should take always precedence.
0 commit comments