From 23c63783d77266c6dbf169b9f1a9dd7f889d9220 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 31 Mar 2022 08:11:55 +0200 Subject: [PATCH] log an ping notification improvements --- .../impl/indicator/AbstractClientIndicator.java | 4 ++-- .../session/impl/indicator/AbstractPingIndicator.java | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java index 3b38b2c2..f1755bcb 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java @@ -84,8 +84,8 @@ public abstract class AbstractClientIndicator implements ClientIndicator { this.connectionId, getType()); - if (this.ditributedIndicatorValueRecordId == null) { - log.warn("Failed to recover from missing indicator value cache record: {} type: {}", + if (this.ditributedIndicatorValueRecordId == null && log.isDebugEnabled()) { + log.debug("Failed to recover from missing indicator value cache record: {} type: {}", this.connectionId, getType()); } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractPingIndicator.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractPingIndicator.java index 98127736..14d0ed5b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractPingIndicator.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractPingIndicator.java @@ -30,15 +30,7 @@ public abstract class AbstractPingIndicator extends AbstractClientIndicator { public final void notifyPing(final long timestamp, final int pingNumber) { super.currentValue = timestamp; - if (!this.cachingEnabled) { - - if (super.ditributedIndicatorValueRecordId == null) { - tryRecoverIndicatorRecord(); - if (this.ditributedIndicatorValueRecordId == null) { - return; - } - } - + if (!this.cachingEnabled && super.ditributedIndicatorValueRecordId != null) { this.distributedIndicatorValueService.updatePingAsync(this.ditributedIndicatorValueRecordId); } }