Merge remote-tracking branch 'origin/dev-1.2-ethz' into dev-1.2

Conflicts:
	src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/DistributedPingCache.java
This commit is contained in:
anhefti 2021-11-09 09:47:37 +01:00
commit 814fa84730
2 changed files with 5 additions and 2 deletions

View file

@ -77,7 +77,9 @@ public abstract class AbstractPingIndicator extends AbstractClientIndicator {
// Update last ping time on persistent storage
final long millisecondsNow = DateTimeUtils.currentTimeMillis();
if (millisecondsNow - this.lastUpdate > INTERVAL_FOR_PERSISTENT_UPDATE) {
this.distributedPingCache.updatePing(this.pingRecord, millisecondsNow);
synchronized (this) {
this.distributedPingCache.updatePing(this.pingRecord, millisecondsNow);
}
}
}
}

View file

@ -24,6 +24,7 @@ import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import ch.ethz.seb.sebserver.gbl.model.session.ClientEvent.EventType;
@ -180,7 +181,7 @@ public class DistributedPingCache implements DisposableBean {
}
}
@Transactional(readOnly = true)
@Transactional(readOnly = true, isolation = Isolation.READ_UNCOMMITTED)
public void updateCache() {
if (this.pingCache.isEmpty()) {