Additional logging in term service
This commit is contained in:
parent
be532ba127
commit
64e03997aa
|
@ -357,7 +357,6 @@ public abstract class BaseHapiTerminologySvc implements IHapiTerminologySvc {
|
||||||
if (parents.contains(-1L)) {
|
if (parents.contains(-1L)) {
|
||||||
return;
|
return;
|
||||||
} else if (parents.isEmpty()) {
|
} else if (parents.isEmpty()) {
|
||||||
ourLog.info("Loading parent concepts of concept {}", theConceptPid);
|
|
||||||
Collection<Long> parentLinks = myConceptParentChildLinkDao.findAllWithChild(theConceptPid);
|
Collection<Long> parentLinks = myConceptParentChildLinkDao.findAllWithChild(theConceptPid);
|
||||||
if (parentLinks.isEmpty()) {
|
if (parentLinks.isEmpty()) {
|
||||||
myChildToParentPidCache.put(theConceptPid, -1L);
|
myChildToParentPidCache.put(theConceptPid, -1L);
|
||||||
|
@ -376,6 +375,10 @@ public abstract class BaseHapiTerminologySvc implements IHapiTerminologySvc {
|
||||||
theParentsBuilder.append(nextParent);
|
theParentsBuilder.append(nextParent);
|
||||||
createParentsString(theParentsBuilder, nextParent);
|
createParentsString(theParentsBuilder, nextParent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int parentCount = myChildToParentPidCache.get(theConceptPid).size();
|
||||||
|
ourLog.info("Found {} parent concepts of concept {} (cache has {})", parentCount, theConceptPid, myChildToParentPidCache.size());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -383,10 +386,12 @@ public abstract class BaseHapiTerminologySvc implements IHapiTerminologySvc {
|
||||||
int maxResult = 1000;
|
int maxResult = 1000;
|
||||||
Page<TermConcept> concepts = myConceptDao.findResourcesRequiringReindexing(new PageRequest(0, maxResult));
|
Page<TermConcept> concepts = myConceptDao.findResourcesRequiringReindexing(new PageRequest(0, maxResult));
|
||||||
if (concepts.hasContent() == false) {
|
if (concepts.hasContent() == false) {
|
||||||
ourLog.info("Clearing parent concept cache");
|
if (myChildToParentPidCache != null) {
|
||||||
myNextReindexPass = System.currentTimeMillis() + DateUtils.MILLIS_PER_MINUTE;
|
ourLog.info("Clearing parent concept cache");
|
||||||
myChildToParentPidCache = null;
|
myNextReindexPass = System.currentTimeMillis() + DateUtils.MILLIS_PER_MINUTE;
|
||||||
return;
|
myChildToParentPidCache = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myChildToParentPidCache == null) {
|
if (myChildToParentPidCache == null) {
|
||||||
|
|
Loading…
Reference in New Issue