Skip to content

Commit

Permalink
Remove verbose log (#5959)
Browse files Browse the repository at this point in the history
* Fix #5955 - Remove verbose log
  • Loading branch information
jamesagnew committed May 24, 2024
1 parent 0fe3380 commit 93e1019
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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."
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ private void commitOpenChanges() {
// 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);
}

Expand Down Expand Up @@ -252,17 +251,19 @@ private int deleteMarkedSearchesInBatches() {
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
Expand Down

0 comments on commit 93e1019

Please sign in to comment.