Skip to content

Conversation

MauriceVanVeen
Copy link
Member

If a TTL was used that's larger than wheelMask * time.Second ≃ 1h 8m, it could take double the time for those messages to expire. This was because we'd only loop through the wheel between a startPos and exitPos. Which works if we only need to loop over a smaller part of the wheel, but doesn't work if we should loop over it in its entirety.

We can simply always loop over the full wheel, since if we do end up expiring anything we call into hw.updateLowestExpires() which loops over the full wheel already anyway.

Signed-off-by: Maurice van Veen github@mauricevanveen.com

@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner July 16, 2025 13:44
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen force-pushed the maurice/thw-no-expiry branch from 461aaba to 9bd7648 Compare July 16, 2025 13:55
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neilalexander neilalexander merged commit cdd07b1 into main Jul 16, 2025
68 of 70 checks passed
@neilalexander neilalexander deleted the maurice/thw-no-expiry branch July 16, 2025 14:47
neilalexander added a commit that referenced this pull request Jul 25, 2025
Includes the following:

- #7031
- #7033
- #7034
- #7035
- #7036
- #7040
- #7043
- #7045
- #7047
- #7046
- #7050
- #7051
- #7052
- #7053
- #7061
- #7063
- #7064
- #7065
- #7066
- #7070
- #7072
- #7080
- #7026
- #6728
- #7074
- #7089
- #7095
- #7087
- #7094
- #7096
- #7099

Signed-off-by: Neil Twigg <neil@nats.io>
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.

3 participants