From 0214e6bffc0d5c988f1aadb7f452c57d5f8edc67 Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Sat, 20 Jun 2026 13:37:59 +0200 Subject: [PATCH 1/2] emergency fix: after math to bug6245; exception may be thrown now upon SmartFutureCache.get in QuickRanksLiveCache --- .../sailing/gwt/ui/server/QuickRanksLiveCache.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/QuickRanksLiveCache.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/QuickRanksLiveCache.java index c51cc24e208..df8178873ee 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/QuickRanksLiveCache.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/QuickRanksLiveCache.java @@ -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) { From de5b4bb252adc14b4a4be1082e00f41e07aff07a Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Sat, 20 Jun 2026 15:35:43 +0200 Subject: [PATCH 2/2] emergency patch part 2: more aftermath to bug6245 in Simulator --- .../server/simulation/SimulationServiceImpl.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/java/com.sap.sailing.server/src/com/sap/sailing/server/simulation/SimulationServiceImpl.java b/java/com.sap.sailing.server/src/com/sap/sailing/server/simulation/SimulationServiceImpl.java index ea4c23dc234..5a8bc449725 100644 --- a/java/com.sap.sailing.server/src/com/sap/sailing/server/simulation/SimulationServiceImpl.java +++ b/java/com.sap.sailing.server/src/com/sap/sailing/server/simulation/SimulationServiceImpl.java @@ -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);