mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-08 03:52:18 +00:00
bug6241: per-race scheduleWindEstimationInstallation primitive
Introduces a single per-race primitive in RacingEventServiceImpl that
composes TrackedRace.runWhenPastLoading with
PolarDataService.runWhenPolarLoadingFinishedFor to install the
maneuver-based wind estimation on a race only once BOTH of these are
true: the race has reached a status strictly beyond LOADING (so
whatever loading was to happen has finished), AND the polar-data
mining pipeline has fully drained this race's loaded fixes.
The primitive is called from two places, replacing two separate
installation code paths with one:
1. RaceAdditionListener.raceAdded, for races added while
windEstimationFactoryService is already registered.
2. setWindEstimationFactoryService (via
setWindEstimationOnAllTrackedRaces), for races that were already
present when the wind-factory service arrives later.
Under either arrival order the same guard applies: the install only
runs if the wind-factory reference is still the one we were scheduled
with, the race hasn't been removed or errored, and no other estimator
has been installed on it in the meantime. This removes the ordering
sensitivity between OSGi service arrival and race creation that
comment #17 on issue 6241 identified as a root cause.
PolarFixCacheUpdater simplifies dramatically: its only remaining job is
to trigger ingestion of the race's fixes into the polar-mining loading
pipeline on the first transition to a status past LOADING. It no longer
holds an installation callback, and it now also fires ingestion for
races that go directly PREPARED->TRACKING without ever entering
LOADING (previously that fallback branch fired only the install
callback, not the ingestion). This ensures the polar-loading gate in
PolarDataMiner always opens for such races, so any pending
runWhenPolarLoadingFinishedFor callbacks can proceed.
Also adds TrackedRace.getWindEstimation() so the installation
primitive can guard against duplicate installation (it was previously
write-only).
This commit is contained in:
1 parent
e3c0e0f187
commit
35298e66a0
6 files changed
+135
-30
No files matched your search
+5
@@ -1399,6 +1399,11 @@ public class MockedTrackedRace implements DynamicTrackedRace {
|
||||
public void setWindEstimation(IncrementalWindEstimation windEstimation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncrementalWindEstimation getWindEstimation() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrackingConnectorInfo getTrackingConnectorInfo() {
|
||||
return null;
|
||||
|
||||
+5
@@ -912,6 +912,11 @@ public class MockedTrackedRaceWithStartTimeAndRanks implements TrackedRace {
|
||||
public void setWindEstimation(IncrementalWindEstimation windEstimation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncrementalWindEstimation getWindEstimation() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrackingConnectorInfo getTrackingConnectorInfo() {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user