aboutsummaryrefslogtreecommitdiffstats
path: root/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-04-28 15:56:45 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-04-28 15:56:45 +0200
commit5d2c85de4e5e5f9182189cb2aaf9369070f41533 (patch)
tree306f65d364d04f5c23e41b8cdc3d3c90c7162342 /configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
parent4fbd27dddde4aff5de1be48f79057b6357bed123 (diff)
More lazy debug log message generation
Diffstat (limited to 'configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
index 536d8894526..9c6786886ef 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
@@ -462,12 +462,12 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye
static void checkIfActiveHasChanged(Session session, Session activeSession, boolean ignoreStaleSessionFailure) {
long activeSessionAtCreate = session.getActiveSessionAtCreate();
- log.log(Level.FINE, activeSession.logPre() + "active session id at create time=" + activeSessionAtCreate);
+ log.log(Level.FINE, () -> activeSession.logPre() + "active session id at create time=" + activeSessionAtCreate);
if (activeSessionAtCreate == 0) return; // No active session at create time
long sessionId = session.getSessionId();
long activeSessionSessionId = activeSession.getSessionId();
- log.log(Level.FINE, activeSession.logPre() + "sessionId=" + sessionId +
+ log.log(Level.FINE, () -> activeSession.logPre() + "sessionId=" + sessionId +
", current active session=" + activeSessionSessionId);
if (activeSession.isNewerThan(activeSessionAtCreate) &&
activeSessionSessionId != sessionId) {
@@ -579,17 +579,17 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye
}
public List<String> deleteUnusedFiledistributionReferences(File fileReferencesPath, Duration keepFileReferences) {
- log.log(Level.FINE, "Keep unused file references for " + keepFileReferences);
+ log.log(Level.FINE, () -> "Keep unused file references for " + keepFileReferences);
if (!fileReferencesPath.isDirectory()) throw new RuntimeException(fileReferencesPath + " is not a directory");
Set<String> fileReferencesInUse = getFileReferencesInUse();
- log.log(Level.FINE, "File references in use : " + fileReferencesInUse);
+ log.log(Level.FINE, () -> "File references in use : " + fileReferencesInUse);
List<String> candidates = sortedUnusedFileReferences(fileReferencesPath, fileReferencesInUse, keepFileReferences);
// Do not delete the newest ones
List<String> fileReferencesToDelete = candidates.subList(0, Math.max(0, candidates.size() - 5));
if (fileReferencesToDelete.size() > 0) {
- log.log(Level.FINE, "Will delete file references not in use: " + fileReferencesToDelete);
+ log.log(Level.FINE, () -> "Will delete file references not in use: " + fileReferencesToDelete);
fileReferencesToDelete.forEach(fileReference -> {
File file = new File(fileReferencesPath, fileReference);
if ( ! IOUtils.recursiveDeleteDir(file))
@@ -619,7 +619,7 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye
private List<String> sortedUnusedFileReferences(File fileReferencesPath, Set<String> fileReferencesInUse, Duration keepFileReferences) {
Set<String> fileReferencesOnDisk = getFileReferencesOnDisk(fileReferencesPath);
- log.log(Level.FINE, "File references on disk (in " + fileReferencesPath + "): " + fileReferencesOnDisk);
+ log.log(Level.FINE, () -> "File references on disk (in " + fileReferencesPath + "): " + fileReferencesOnDisk);
Instant instant = Instant.now().minus(keepFileReferences);
return fileReferencesOnDisk
.stream()