parent
0fe3380c4a
commit
93e101973e
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
type: fix
|
||||||
|
issue: 5959
|
||||||
|
title: "An overly verbose log in the JPA server about deleting stale searches has been reduced to DEBUG level."
|
|
@ -220,7 +220,6 @@ public class DatabaseSearchCacheSvcImpl implements ISearchCacheSvc {
|
||||||
// flush to force Hibernate to actually get a connection from the pool
|
// flush to force Hibernate to actually get a connection from the pool
|
||||||
myEntityManager.flush();
|
myEntityManager.flush();
|
||||||
// get our connection from the underlying Hibernate session, and commit
|
// get our connection from the underlying Hibernate session, and commit
|
||||||
//noinspection resource
|
|
||||||
myEntityManager.unwrap(Session.class).doWork(Connection::commit);
|
myEntityManager.unwrap(Session.class).doWork(Connection::commit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,17 +251,19 @@ public class DatabaseSearchCacheSvcImpl implements ISearchCacheSvc {
|
||||||
flushSearchAndIncludeDeletes();
|
flushSearchAndIncludeDeletes();
|
||||||
|
|
||||||
int deletedCount = deletedCounter.get();
|
int deletedCount = deletedCounter.get();
|
||||||
|
if (deletedCount > 0) {
|
||||||
ourLog.info("Deleted {} expired searches", deletedCount);
|
ourLog.debug("Deleted {} expired searches", deletedCount);
|
||||||
|
}
|
||||||
|
|
||||||
return deletedCount;
|
return deletedCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Schedule theSearchPid for deletion assuming it has theNumberOfResults SearchResults attached.
|
* Schedule theSearchPid for deletion assuming it has theNumberOfResults SearchResults attached.
|
||||||
*
|
* <p>
|
||||||
* We accumulate a batch of search pids for deletion, and then do a bulk DML as we reach a threshold number
|
* We accumulate a batch of search pids for deletion, and then do a bulk DML as we reach a threshold number
|
||||||
* of SearchResults.
|
* of SearchResults.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @param theSearchPid pk of the Search
|
* @param theSearchPid pk of the Search
|
||||||
* @param theNumberOfResults the number of SearchResults attached
|
* @param theNumberOfResults the number of SearchResults attached
|
||||||
|
|
Loading…
Reference in New Issue