Commit Graph
248 Commits
Author SHA1 Message Date
Axel Uhl dc24eb05f5 bug6227: publish MDI result only at true completion, after sensor-fix import
The AdminConsole client reported import success before the sensor-fix import
had even started. The client's completion signal is a non-null
DataImportProgress result, but ImportMasterDataOperation.internalApplyTo set
the result and overall progress 1.0 at the end of the object-graph apply() --
which returns to MasterDataImporter.importFromStream, where the wind-track and
sensor-fix imports still run afterward. So "Done"/1.0/result fired prematurely.

Move ownership of terminal completion to MasterDataImporter.importFromStream,
the true end of the whole import (object graph + wind + fixes):

- ImportMasterDataOperation.internalApplyTo no longer sets the result, overall
  1.0, or logs "Done"; it ends at overall 0.6 and returns creationCount.
- MasterDataImporter publishes the single terminal completion after the wind
  band (0.6->0.8) and sensor-fix band (0.8->1.0):
  createOrUpdateDataImportProgressWithReplication(id, 1.0, IMPORT_SENSOR_FIXES,
  1.0, creationCount). The result is set only at true 1.0, with replication,
  so replica-polling clients observe completion correctly.
- Plumb a nullable MasterDataImportObjectCreationCount through a new 5-arg
  createOrUpdateDataImportProgressWithReplication overload and the
  CreateOrUpdateDataImportProgress operation, which sets the result on replicas
  via progress.setResult(result) when non-null.
- createOrUpdateDataImportProgressWithoutReplication now uses getDataImportLock()
  instead of the raw field so subclass overrides (the test mock) are honored;
  a no-op in production where the getter returns the field.

serialVersionUIDs left unchanged: adding a nullable field is serialization-
compatible and master/replicas upgrade together.

Verified: MasterDataImportTest 13/13 green; both projects compile clean.

Assisted-By: Claude Opus (claude-opus-5)
2026-09-22 21:50:49 +02:00
Axel Uhl 3395b1592e bug6227: bound MDI memory for wind tracks; merge per-device fix ranges; monotonic progress
Follow-up to fd6739d9a6 (stream GPS fixes as top-level objects), addressing
four defects on the master data import path:

- Merge DeviceMappingDescriptor objects per DeviceIdentifier into a single
  MultiTimeRange so a device mapped in several regattas (or via several
  open-ended mapping events) has its fixes streamed once over coalesced,
  non-overlapping sub-ranges rather than once per mapping. Obsoletes and
  removes the nested DeviceMappingDescriptor class; the field becomes
  Map<DeviceIdentifier, MultiTimeRange> raceLogTrackingDeviceRanges. The
  inclusive mapping end is carried through and streamed with
  toIsInclusive=true, at worst streaming a harmless superset (store dedups).

- Apply the top-level-streaming + per-object reset() design to
  WindTrackMasterData: strip the wind tracks out of the serialized graph,
  stream one WindTrackMasterData at a time on export (held only transiently),
  and read+store them incrementally on import (master only). Bounds retained
  memory to a single wind track at a time instead of the whole season.

- Remove the premature "Done importing master data into ..." log and the
  overall 1.0 from ImportMasterDataOperation.internalApplyTo; that fired
  before the sensor-fix import ran. The single terminal "Done" and 1.0 now
  live in MasterDataImporter.importFromStream, the true end of the import.

- Make progress rise monotonically and reserve the two phases that usually
  dominate the import: the object graph now ends at 0.6, the wind-track
  import occupies 0.6 -> 0.8 (20%), and the sensor-fix import occupies
  0.8 -> 1.0 (20%), instead of reaching 1.0 in the operation and then
  dropping back in the importer.

Assisted-By: Claude Opus 4.8 (claude-opus-5)
2026-09-22 21:05:45 +02:00
Axel Uhl fd6739d9a6 bug6227: stream MDI GPS fixes as top-level objects to bound memory
Master data import/export (MDI) previously materialized every mapped
device's GPS fixes in memory before serialization: the fixes lived inside
the single TopLevelMasterData object graph written with one writeObject, so
ObjectOutputStream/ObjectInputStream had to retain a handle for every fix to
resolve potential back-references. For events with many fixes this dominated
heap on both the exporting and importing server.

Change the wire format so fixes are streamed as top-level stream objects
after the (now fix-free) TopLevelMasterData:

- TopLevelMasterData no longer carries the fixes themselves. It records
  lightweight, fully Serializable DeviceFixMappingDescriptor entries
  (device, from, toInclusive) plus a transient SensorFixStore used only on
  the export side. Default serialization now does the right thing; the
  stripped replica copy carries no descriptors.
- MasterDataResource.writeRaceLogTrackingFixes streams each device section
  straight from the SensorFixStore: device header, each fix as a top-level
  object, a null fix terminator, then ObjectOutputStream.reset() once per
  device so no fix handle is retained across devices while the fix class
  descriptor stays shared within a device. A trailing null device ends the
  section. Framing uses null sentinels, never fix counts (a concurrent write
  could invalidate a count).
- MasterDataImporter.importRaceLogTrackingGPSFixes reads that section
  incrementally and stores fixes in batches of BATCH_SIZE_FOR_IMPORTING_FIXES
  directly into the master's SensorFixStore, holding at most one batch at a
  time. This stream-based import only ever runs on the primary/master:
  such requests must always be routed there, and a replica receives only the
  stripped ImportMasterDataOperation (no fixes), obtaining tracking data by
  the master loading tracked races whose transactions are replicated. A
  non-null master descriptor here is therefore a broken routing state and is
  reported by throwing IllegalStateException rather than silently draining.
  IMPORT_SENSOR_FIXES sub-progress is advanced once per device section,
  driven by the descriptor count, restoring the per-device granularity that
  existed before.
- ImportMasterDataOperation no longer imports fixes; that logic moved to
  MasterDataImporter, which has the target store in scope.

Exporter and importer are upgraded together; mixed-version transfer is not
required.

Verified: MasterDataImportTest green (full class 13/13 repeatedly;
testMasterDataImportWithoutHttpStack repeatedly), covering the 4999/5000/5001
batch-boundary fix counts and the DoubleVectorFix round trip.

Assisted-By: Claude Opus 4.8 (claude-opus-5)
2026-09-22 17:36:22 +02:00
Axel Uhl 8eefa411da bug6288: use TimePoint instead of long millis in RaceLiveContent
Refactor RaceLiveContent to carry TimePoint values for tracking start and
end instead of long millis, matching the earlier LiveContentCheckResult
change and removing the "millis" naming where the value is now a TimePoint.

- RaceLiveContent: trackingStart/trackingEnd fields, constructor and getters
  now use TimePoint; serialVersionUID regenerated for the new field layout.
- GWT RPC custom field serializer writes/reads the TimePoints via
  writeObject/readObject.
- JSON serializer keeps the millis-long wire format (null-guarded) under the
  unchanged trackingStartMillis/trackingEndMillis keys; deserializer now uses
  asLong(...) for both values and wraps non-null millis in TimePoint.of(...),
  making the deserialization null-safe for both start and end.
- LiveContentResource passes TrackedRace.getStartOfTracking()/getEndOfTracking()
  through directly rather than calling asMillis() on a possibly-null value.
- RacingEventService.getAllTrackedRacesForEventTrackingAt Javadoc completed and
  extended to document that every returned TrackedRace has a non-null start of
  tracking (end of tracking may still be null).
- Updated LandscapeManagementPanel display and TestLiveContentValueTypes.

Assisted-By: Claude Opus 4.8 (Claude Code)
2026-09-14 23:30:19 +02:00
Axel Uhl b2994fee62 bug6275: removed unused code 2026-08-05 13:34:51 +02:00
Masha Kashirina 286d4d1a95 bug6275:tocken intr 2026-07-31 03:07:50 +02:00
Axel Uhl c1e972370d bug6275: whitespace and comment changes only 2026-07-28 16:54:45 +02:00
Masha Kashirina 43da2d4de5 bug6275: getEvents impl 2026-07-24 19:02:42 +02:00
Masha Kashirina d61f68c1dd bug6275: remote server course areas loading ui 2026-07-21 11:53:24 +02:00
Axel Uhl e4e142d936 bug6229: removed now unused parameter for event/regatta time range filtering 2026-04-06 23:34:05 +02:00
Axel Uhl 863468baa2 bug6229: first implementation to filter by Regatta/Event end time during fix import 2026-03-30 18:35:05 +02:00
Axel Uhl 4e90ebea2f bug6223: encapsulate queue size calculation in SimulationService 2026-03-27 19:57:24 +01:00
Axel Uhl b45dae9412 bug6223: return null from SimulationServiceImpl.getSimulationResults if not cached 2026-03-27 11:06:02 +01:00
Axel Uhl 0716fd6a73 bug6222: keep ordering of fixes loaded from DB in TopLevelMasterdata;
this avoids the use of a HashSet and instead uses LinkedList to keep the
order of items added
2026-03-25 00:38:47 +01:00
Axel Uhl b2e4e7298a Merge branch 'main' into bug5959 2026-03-07 22:45:42 +01:00
Axel Uhl 22f180cee1 bug6215: moving Speed, Position, Bearing, Weigher and others to SSE; GWT CFSs not done yet 2026-03-03 17:30:56 +01:00
Axel Uhl e927669914 bug5959: formatting, whitespaces 2025-11-17 13:45:32 +01:00
Axel Uhl 20bb4e7734 Merge branch 'main' into bug5959 2025-10-24 11:16:12 +02:00
Axel Uhl 4fd6731f62 bug6157: renamed com.sap.sailing.domain.tracking to com.sap.sailing.domain.shared.tracking in com.sap.sailing.domain.shared.android;
same for the corresponding .impl package; this removes the ambiguity
with the com.sap.sailing.domain bundle that exports the same packages.
2025-09-24 17:14:12 +02:00
Luise Henning 0949ae0b4c ManeuverFingerprintRestry added 2025-09-24 16:08:59 +02:00
Axel Uhl 6d3e7564cf formatting/comment changes only 2025-07-30 16:11:14 +02:00
Axel Uhl 5b235ca352 bug6135: improved logging of master data import operation 2025-07-03 12:00:54 +02:00
Axel Uhl b6434167dd bug6095: tags now have a hiddenInfo field, used for tag identifiers;
added the AI icon to com.sap.sailing.www/images for stability;
improved sizing of images displayed with tags
2025-02-26 17:08:02 +01:00
Axel Uhl ad4cd299fc Revert "bug6095: moved Activator to impl package, export aiagent package"
This reverts commit ebaf236e81.
2025-02-25 15:07:49 +01:00
Axel Uhl ebaf236e81 bug6095: moved Activator to impl package, export aiagent package 2025-02-25 15:07:27 +01:00
Axel Uhl cea7f47a4a bug5450: implement Percent Target Boat Speed as leaderboard column;
for ORC PCS compute it based on implied wind divided by current wind
speed
2025-02-06 11:30:38 +01:00
Axel Uhl 76c41ae067 bug6091: implemented percent target boat speed for chart/tails 2025-01-29 13:48:09 +01:00
Axel Uhl 6ed60b500a bug6077: moved functionality for competitor details from SailingService to RacingEventService 2024-12-16 14:55:24 +01:00
Axel Uhl 2a614484d8 bug6069: interims commit; made SailorProfilePreferences available through com.sap.sailing.server.interfaces 2024-11-13 14:23:50 +01:00
Axel Uhl 7d075ed3dc Merge branch 'main' into bug5067 2024-09-11 00:43:59 +02:00
Axel Uhl fcd8c6fdcc bug5076: stop tracking and remove tracked race when "un-denoting" 2024-09-10 18:27:58 +02:00
Axel Uhl c39fc1f5bc bug5587: introduced WindTrack.add(Iterable) for mass insert 2024-08-22 12:04:15 +02:00
Axel Uhl 681bec61cf bug6007: implemented logging for event and regatta creation 2024-06-05 15:20:16 +02:00
Axel Uhl c34a90a3db bug5982: use TrackedRegatta.getExistingTrackedRace(RaceDefinition) where possible;
this avoids most of the blocking calls to
TrackedRegatta.getTrackedRace(RaceDefinition) which can lead to endless
waits, depleting pool and other threads when called while a race is
being removed
2024-03-14 15:23:01 +01:00
Axel Uhl 0c9c4b60e7 Merge branch 'master' into bug5960 2024-02-26 15:18:04 +01:00
Axel Uhl b26c15c765 bug5970: first compiling version with true heading in GPSFixMoving 2024-02-20 16:58:25 +01:00
Axel Uhl abfdc3e632 bug5960: completed CourseConfigurationDTO and field types, added corresponding converters 2024-02-13 17:42:12 +01:00
Axel Uhl 6adbfeb028 bug5960: comment changes only 2024-02-12 16:57:11 +01:00
Axel Uhl c911efe2f8 turn com.sap.sailing.server.interface to lazy bundle 2024-01-09 10:59:57 +01:00
Axel Uhl 8ac81931dc bug3286: explicit parameter controls whether to load race logs upon configuring race log store 2024-01-02 15:56:26 +01:00
Wessels, Udo (PPN) 2b66121265 bug5910: remove not supported line in .project files so that current Eclipse version (2023-09) can import the projects. 2023-10-09 18:00:50 +02:00
Axel Uhl 08e8f96478 bug fix: apply competitor updates also for league set-up 2023-08-10 15:00:59 +02:00
Axel Uhl 9dd347b7c2 bug5866/bug5867: pass through centerPosition/radius for CourseArea creation 2023-08-02 16:07:06 +02:00
Axel Uhl 89fb5f184c bug5867: interims commit making course area part of LeaderboardBase[Impl] 2023-07-28 16:37:17 +02:00
Axel Uhl 1325f60a0b bug5873: persistence, UI, and replication for incremental score offsets;
no evaluation yet when calculating scores; that's the next step
2023-07-25 14:33:28 +02:00
Axel Uhl 2e669c4ea8 Merge branch 'master' into bug5147 2022-11-07 12:58:01 +01:00
Finn Huelsbusch 580360668d Merge master into branch 2022-10-13 10:06:37 +02:00
Axel Uhl 804f5df550 bug5217: major refactoring, passing through MarkPassingRaceFingerprintRegistry "everywhere" 2022-10-12 15:08:42 +02:00
Axel Uhl 9ea955ae2c Merge branch 'bug5217' 2022-10-12 09:52:02 +02:00
Finn Huelsbusch eef846e4c7 Merge remote-tracking branch 'origin/master' into bug5147 2022-10-11 19:37:30 +02:00