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/informer/TemporaryResourceCache.java
+13-11Lines changed: 13 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -85,20 +85,22 @@ public synchronized Optional<ResourceEvent> doneEventFilterModify(
85
85
returnOptional.empty();
86
86
}
87
87
vared = activeUpdates.get(resourceID);
88
-
if (ed.decreaseActiveUpdates(updatedResourceVersion)) {
89
-
activeUpdates.remove(resourceID);
90
-
varres = ed.getLatestEventAfterLastUpdateEvent();
88
+
if (ed == null || !ed.decreaseActiveUpdates(updatedResourceVersion)) {
91
89
log.debug(
92
-
"Zero active updates for resource id: {}; event after update event: {}; updated resource"
93
-
+ " version: {}",
94
-
resourceID,
95
-
res.isPresent(),
96
-
updatedResourceVersion);
97
-
returnres;
98
-
} else {
99
-
log.debug("Active updates {} for resource id: {}", ed.getActiveUpdates(), resourceID);
90
+
"Active updates {} for resource id: {}",
91
+
ed != null ? ed.getActiveUpdates() : 0,
92
+
resourceID);
100
93
returnOptional.empty();
101
94
}
95
+
activeUpdates.remove(resourceID);
96
+
varres = ed.getLatestEventAfterLastUpdateEvent();
97
+
log.debug(
98
+
"Zero active updates for resource id: {}; event after update event: {}; updated resource"
0 commit comments