mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-02 01:00:46 +00:00
The Javadoc on PolarDataService.runWhenPolarLoadingFinishedFor (interface), PolarDataMiner (impl) and the RacingEventServiceImpl.scheduleWindEstimationInstallation caller all read as if the callback fired once the fixes belonging to the given race had drained. In reality the loading pipeline (preFilteringProcessorForLoadedFixes) is shared across all races and has no per-race completion tracking, so the callback fires only on a global drain: when the fixes of every race ingested so far have been processed. The race parameter does not scope the wait; it only gates WHEN the callback may attach to the shared drain, via two conditions that must both hold: (1) the race's own fixes have been ingested (so the callback can't fire on a pipeline that is merely momentarily idle before this race was queued), and (2) markLoadingOfAllRacesToRestoreStarted() has been signalled (so an idle window between two startup races' ingestion bursts isn't mistaken for a real drain). This global-wait behavior is deliberate: we want the polar model to reflect all loaded data before any maneuver-based wind estimation is installed, and we accept the resulting startup sequentiality (an early race's estimator install waits behind the whole loaded-fix backlog). Documentation only; no behavior change. The method name is kept as-is.