Skip to content

Commit 0834d27

Browse files
committed
wip
Signed-off-by: Attila Mészáros <[email protected]>
1 parent ef7bdf7 commit 0834d27

File tree

1 file changed

+4
-3
lines changed
  • operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer

1 file changed

+4
-3
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,16 @@ public Set<R> getSecondaryResources(P primary) {
256256

257257
if (useSecondaryToPrimaryIndex()) {
258258
var primaryID = ResourceID.fromResource(primary);
259+
var complementaryIds = complementaryPrimaryToSecondaryIndex.getSecondaryResources(primaryID);
259260
var resources = byIndex(PRIMARY_TO_SECONDARY_INDEX_NAME, resourceIdToString(primaryID));
260-
log.debug("Resources in cache: {}", resources);
261+
log.debug("Resources in cache: {} kind: {}", resources, resourceType().getSimpleName());
261262
log.debug(
262263
"Using informer primary to secondary index to find secondary resources for primary name:"
263264
+ " {} namespace: {}. Found {}",
264265
primary.getMetadata().getName(),
265266
primary.getMetadata().getNamespace(),
266267
resources.size());
267-
var complementaryIds = complementaryPrimaryToSecondaryIndex.getSecondaryResources(primaryID);
268+
268269
log.debug("Complementary ids: {}", complementaryIds);
269270
var res =
270271
resources.stream()
@@ -279,7 +280,7 @@ public Set<R> getSecondaryResources(P primary) {
279280
complementaryIds.forEach(
280281
id -> {
281282
Optional<R> resource = get(id);
282-
resource.ifPresentOrElse(res::add, () -> log.debug("Resource not found: {}", id));
283+
resource.ifPresentOrElse(res::add, () -> log.warn("Resource not found: {}", id));
283284
});
284285
return res;
285286
} else {

0 commit comments

Comments
 (0)