Skip to content

Fix sub-second queue delays in TWMQ #99

Merged
0xFirekeeper merged 7 commits intomainfrom
firekeeper/twmq-delay
Mar 19, 2026
Merged

Fix sub-second queue delays in TWMQ #99
0xFirekeeper merged 7 commits intomainfrom
firekeeper/twmq-delay

Conversation

@0xFirekeeper
Copy link
Member

@0xFirekeeper 0xFirekeeper commented Mar 19, 2026

Sub-second delayed requeues in TWMQ were being truncated to 0s because queue scheduling used Duration::as_secs().

That meant values like 200ms were effectively treated as immediate retries, which could cause hot-looping at queue poll cadence.

This change adds a small helper that rounds any non-zero sub-second delay up to 1s and uses it consistently in:

  • queue push scheduling
  • hook scheduling
  • multilane queue scheduling

Summary by CodeRabbit

  • Chores

    • Switched Redis usage from cluster clients to a single connection-manager model and simplified Redis key namespaces (removed engine hash-tag).
    • Removed TLS- and clustering-related dependency features and cleaned dependency configs.
    • Added a timeout to the coverage CI run.
  • Bug Fixes / Behavior

    • Normalized delay-to-queue scheduling to avoid zero/near-zero delay inconsistencies.
  • Tests

    • Updated tests and cleanup helpers to match Redis/key changes.

Loading
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