Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7733 +/- ##
============================================
+ Coverage 82.34% 82.37% +0.03%
- Complexity 8447 8467 +20
============================================
Files 843 844 +1
Lines 26156 26201 +45
Branches 5110 5115 +5
============================================
+ Hits 21538 21583 +45
Misses 3830 3830
Partials 788 788 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
alxkm
marked this pull request as ready for review
November 7, 2026 09:57
Windowed algorithms assume time moves forward. When it does not, nothing fails loudly: a window holds samples that never coexisted, a rate is computed over a negative interval, a duplicate is counted twice. Retries, buffers flushed after a reconnect, several producers writing into one topic and a clock stepped backwards all cause this, and the cheap defence is to check the order explicitly. Each timestamp is compared with the previous one and classified as INCREASING, DUPLICATE or BACKWARDS. The checker only reports, it does not reorder or drop anything, so lastTimestamp is always the most recent sample, not the largest. It also keeps the worst backwards step, which is what you need to size a reordering buffer. O(1) time per sample and O(1) state; non-finite timestamps are refused. Tests: the first timestamp is always accepted, an ordered stream has no violations, duplicates and backwards steps are counted separately, the worst step is the largest one and not the last one, the stream is not reordered, scan returns one verdict per timestamp, and reset restores the initial state. Signed-off-by: alxkm <19151554+alxkm@users.noreply.github.com>
alxkm
force-pushed
the
feat/timestamp-order-checker
branch
from
November 7, 2026 09:59
ea480b2 to
4ba6857
Compare
Signed-off-by: alxkm <19151554+alxkm@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
TimestampOrderCheckerto the streaming package. It checks each timestamp against the previous one and reports it as increasing, duplicate or backwards. It does not reorder or drop anything. It also keeps the worst backwards step, which tells you how big a reordering buffer would need to be to fix the stream. O(1) per sample.clang-format -i --style=file path/to/your/file.java