Skip to content

Fix dedup timing race with monotonic Instant#88

Merged
sarroutbi merged 1 commit into
keylime-webtool:mainfrom
sarroutbi:switch-dedup-to-monotonic-instant
May 11, 2026
Merged

Fix dedup timing race with monotonic Instant#88
sarroutbi merged 1 commit into
keylime-webtool:mainfrom
sarroutbi:switch-dedup-to-monotonic-instant

Conversation

@sarroutbi
Copy link
Copy Markdown
Contributor

The dedup tracker used chrono::DateTime (wall-clock) with num_seconds() truncation, causing the background task to skip every other tick: 29.8s truncated to 29 < 30 → rejected. Switch to tokio::time::Instant (monotonic, sub-nanosecond precision) and replace tokio::time::interval with sleep-after-processing so the 30s gap starts after mark_recorded, not before.

The dedup tracker used chrono::DateTime<Utc> (wall-clock) with
num_seconds() truncation, causing the background task to skip every
other tick: 29.8s truncated to 29 < 30 → rejected. Switch to
tokio::time::Instant (monotonic, sub-nanosecond precision) and replace
tokio::time::interval with sleep-after-processing so the 30s gap
starts after mark_recorded, not before.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
@sarroutbi sarroutbi merged commit 860d3cb into keylime-webtool:main May 11, 2026
12 checks passed
@sarroutbi sarroutbi deleted the switch-dedup-to-monotonic-instant branch May 11, 2026 13:05
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