You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bifromq.apache.org by "efegokdemir (via GitHub)" <gi...@apache.org> on 2026/09/24 12:35:00 UTC
[PR] fix: preserve causality for future HLC updates [bifromq]
efegokdemir opened a new pull request, #295:
URL: https://github.com/apache/bifromq/pull/295
## Summary
Fix the HLC receive-event branch so an observed timestamp that is ahead of the local clock produces a timestamp greater than the observed value.
## Changes
- Compare the merged logical time with the observed logical time when selecting the remote-ahead branch.
- Add a regression test using a future timestamp with a non-zero causal counter.
## Testing
- `git diff --cached --check` — passed
- `mvn -pl base-hlc -Dtest=HLCTest -DskipITs -Dcheckstyle.skip -Drat.skip -Dspotless.skip=true test` — blocked by the available OpenJDK 27/Lombok compiler incompatibility (`NoSuchFieldError`); the repository targets Java 17 and no Java 17 runtime is installed
Fixes #285
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@bifromq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: preserve causality for future HLC updates [bifromq]
Posted by "popduke (via GitHub)" <gi...@apache.org>.
popduke merged PR #295:
URL: https://github.com/apache/bifromq/pull/295
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@bifromq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: preserve causality for future HLC updates [bifromq]
Posted by "ImDanXie (via GitHub)" <gi...@apache.org>.
ImDanXie commented on PR #295:
URL: https://github.com/apache/bifromq/pull/295#issuecomment-5814993381
Verified independently — the fix matches the reference receive rule (Kulkarni et al.), and the added regression test is the exact repro from #285.
Since the PR notes the test could not be run locally (JDK/Lombok mismatch): we ran it against the compiled base-hlc classes (OpenJDK 17, same code) during the investigation behind #285 —
```
observed=(l=1790183330031,c=5) -> update() returned=(l=1790183330031,c=0) # before: now < observed
```
and with this one-line change the assertion updated > observed passes (returns c = otherC + 1 = 6).
One note for whoever merges: the existing HLCTest.update() keeps feeding the clock its own get() output (l == l_m), which is why this branch was never covered before — worth keeping the new test pinned to a future l_m (as it is here) rather than a self-observed timestamp.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@bifromq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org