Merge branch 'eclipse-main' into bug6226

This commit is contained in:
Axel Uhl
2026-06-20 16:05:35 +02:00
2 changed files with 21 additions and 3 deletions
@@ -126,7 +126,16 @@ public class QuickRanksLiveCache {
}
public QuickRanksDTO get(RegattaAndRaceIdentifier raceIdentifier) {
QuickRanksDTO result = cache.get(raceIdentifier, false);
// The following may throw an exception that was stored upon an earlier re-compute attempt;
// see also the changes of bug6245, so we need to recompute if we read null or if
// we get an exception
QuickRanksDTO result = null;
try {
result = cache.get(raceIdentifier, false);
} catch (Exception e) {
logger.log(Level.WARNING, "Exception while reading QuickRanksCache for race "+raceIdentifier
+ "; re-computing");
}
if (result == null) {
final TrackedRace trackedRace = service.getExistingTrackedRace(raceIdentifier);
if (trackedRace != null) {
@@ -17,6 +17,7 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.sap.sailing.domain.base.BoatClass;
@@ -398,9 +399,17 @@ public class SimulationServiceImpl implements SimulationService {
@Override
public SimulationResults getSimulationResults(LegIdentifier legIdentifier) {
SimulationResults result = cache.get(legIdentifier, false);
SimulationResults result = null;
try {
result = cache.get(legIdentifier, false);
if (result == null) {
logger.fine("Simulation Get: Cache Empty: \"" + legIdentifier.toString() + "\"");
}
} catch (Exception e) {
logger.log(Level.WARNING, "Exception trying to get simulation results for "+legIdentifier+
"; re-calculating", e);
}
if (result == null) {
logger.fine("Simulation Get: Cache Empty: \"" + legIdentifier.toString() + "\"");
if (!raceListeners.containsKey(legIdentifier.getRegattaName())) {
final Regatta regatta = racingEventService.getRegattaByName(legIdentifier.getRegattaName());
final DynamicTrackedRegatta trackedRegatta = racingEventService.getTrackedRegatta(regatta);