Skip to content

Merged latest eclipse/main updates to downstream - #102

Merged
axeluhl merged 6 commits into
SAP:mainfrom
eclipse-sailing-analytics-bot:main
Oct 1, 2026
Merged

axeluhl merged 6 commits into
SAP:mainfrom
eclipse-sailing-analytics-bot:main

Conversation

@eclipse-sailing-analytics-bot

Copy link
Copy Markdown

Automated merge of upstream eclipse/main (and re-sync of downstream) into SAP/sailing-analytics:main.

Incoming commits (4)

  • Wiki improvements (d980f17)
  • bug2626: make testMaxSpeedCacheRaceCondition deterministic (0cb1df2)
  • make testMaxSpeedCacheRaceCondition deterministic (e4360b2)

The test reproduced a MaxSpeedCache race by letting a stale
computeMaxSpeed(...) result get cached after invalidating GPS fixes had
been added. It relied on a fixed Thread.sleep(1000) inside computeMaxSpeed
to "hope" the three fix-adding threads had reached the point of contending
for the cache's write lock. Under CI load this timing assumption broke and
the test failed with a CyclicBarrier TimeoutException.

Replace the sleep with an explicit CyclicBarrier (fixThreadsReadyToContend,
parties=4): the first query's stale computation and all three fix-adding
threads rendezvous on it, so the stale result only completes once the
invalidations are guaranteed to be about to contend. Hoist the threads to
named locals and join all of them, establishing happens-before between the
invalidations and the second query before asserting the recomputed maximum
speed. This removes the timing dependency and makes the ordering
deterministic.

Assisted-By: Claude Opus 4.8 (claude-opus-5-5)
The barrier-based synchronization introduced earlier let the second query's
re-entry into computeMaxSpeed(...) await the auto-reset CyclicBarrier a second
time. Only the three fix-adding threads plus the first query's stale
computation ever reach the barrier, so on the second generation the number of
arriving parties depended on how many times computeMaxSpeed(...) got re-entered
via cacheLookup(...)'s recursive getMaxSpeed(entryTo, to) stitching after the
cache was invalidated. That count varies with thread scheduling: locally it
happened to reach the barrier's party count and returned fast, while in CI it
did not, so await(20s) timed out and the write lock was reported held for more
than 10s, failing the run consistently.

Gate the barrier await with an AtomicBoolean so that exactly the first
computeMaxSpeed(...) invocation waits on the barrier. Every later invocation
(the second query and all its recursive sub-range computations) skips it,
removing the scheduling-dependent second-generation rendezvous entirely.

Assisted-By: Claude Opus 4.8 (claude-opus-4-8)
axeluhl
axeluhl previously approved these changes Oct 1, 2026

@axeluhl axeluhl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test stability and wiki improvements

@axeluhl axeluhl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Onboarding changes LGTM

@axeluhl
axeluhl merged commit 021350f into SAP:main Oct 1, 2026
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants