Remove verbose log (#5959)

* Fix #5955 - Remove verbose log
This commit is contained in:
James Agnew 2024-05-24 10:01:21 -04:00 committed by GitHub
parent 0fe3380c4a
commit 93e101973e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View File

@ -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."

View File

@ -220,7 +220,6 @@ public class DatabaseSearchCacheSvcImpl implements ISearchCacheSvc {
// flush to force Hibernate to actually get a connection from the pool
myEntityManager.flush();
// get our connection from the underlying Hibernate session, and commit
//noinspection resource
myEntityManager.unwrap(Session.class).doWork(Connection::commit);
}
@ -252,17 +251,19 @@ public class DatabaseSearchCacheSvcImpl implements ISearchCacheSvc {
flushSearchAndIncludeDeletes();
int deletedCount = deletedCounter.get();
ourLog.info("Deleted {} expired searches", deletedCount);
if (deletedCount > 0) {
ourLog.debug("Deleted {} expired searches", deletedCount);
}
return deletedCount;
}
/**
* 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
* of SearchResults.
* </p>
*
* @param theSearchPid pk of the Search
* @param theNumberOfResults the number of SearchResults attached