Skip to content

Comments

deduplication: do not use system_clock as timejumps cause problems#70

Merged
alexcekay merged 1 commit intoupstream-rebasefrom
pr-dedup-clk-fix
Sep 10, 2025
Merged

deduplication: do not use system_clock as timejumps cause problems#70
alexcekay merged 1 commit intoupstream-rebasefrom
pr-dedup-clk-fix

Conversation

@alexcekay
Copy link
Member

This can lock in case of timejumps

time_t timestamp
    = duration_cast<milliseconds>(std::chrono::steady_clock::now() - _start_time).count();
// pop data from front queue, delete corresponding data from multiset
while (!_time_hash_queue.empty()

This can happen due to:

  • system_clock is being used, which is not monotonic
  • Timestamps are in uint32_t, so there is a cast from the int64_t timestamp
    Both can lead to weird situations where due to the overflow and casting timestamps could be before stored ones.

@alexcekay alexcekay marked this pull request as ready for review September 10, 2025 16:36
@alexcekay alexcekay merged commit 0f5794f into upstream-rebase Sep 10, 2025
6 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.

1 participant