Skip to content

Commit

Permalink
Little more diagnostics for resource caching in provisioning.
Browse files Browse the repository at this point in the history
(cherry picked from commit 5401391)
  • Loading branch information
mederly committed Oct 2, 2017
1 parent 485cbd4 commit d86111b
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -181,6 +181,7 @@ private PrismObject<ResourceType> loadAndCacheResource(PrismObject<ResourceType>

if (!isComplete(completedResource)) {
// No not cache non-complete resources (e.g. those retrieved with noFetch)
LOGGER.trace("Not putting resource {} ({}) into cache because it's not complete", repositoryObject.getName(), repositoryObject.getOid());
return completedResource;
}

Expand All @@ -198,6 +199,9 @@ private PrismObject<ResourceType> loadAndCacheResource(PrismObject<ResourceType>
if (completeResourceResult.isSuccess()) {
// Cache only resources that are completely OK
resourceCache.put(completedResource);
} else {
LOGGER.trace("Not putting {} into cache because the completeResource operation status is {}",
ObjectTypeUtil.toShortString(repositoryObject), completeResourceResult.getStatus());
}

InternalMonitor.getResourceCacheStats().recordMiss();
Expand Down

0 comments on commit d86111b

Please sign in to comment.