Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,17 @@ private void propagateEvent(R object) {
public Set<R> getSecondaryResources(P primary) {
Set<ResourceID> secondaryIDs;
if (useSecondaryToPrimaryIndex()) {
var primaryResourceID = ResourceID.fromResource(primary);
secondaryIDs =
primaryToSecondaryIndex.getSecondaryResources(ResourceID.fromResource(primary));
primaryToSecondaryIndex.getSecondaryResources(primaryResourceID);
log.debug(
"Using PrimaryToSecondaryIndex to find secondary resources for primary: {}. Found secondary ids: {} ",
primaryResourceID, secondaryIDs);
} else {
secondaryIDs = primaryToSecondaryMapper.toSecondaryResourceIDs(primary);
log.debug(
"Using PrimaryToSecondaryMapper to find secondary resources for primary: {}. Found secondary ids: {} ",
primary, secondaryIDs);
}
return secondaryIDs.stream().map(this::get).flatMap(Optional::stream)
.collect(Collectors.toSet());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ public Optional<R> get(ResourceID resourceID) {
} else {
log.debug("Resource not found in temporary cache reading it from informer cache," +
" for Resource ID: {}", resourceID);
return cache.get(resourceID);
var res = cache.get(resourceID);
log.debug("Resource found in cache: {} for id: {}", res.isPresent(), resourceID);
return res;
}
}

Expand Down