Skip to content

fix(server): properly cleanup messages in message cleaner#2670

Merged
hubcio merged 4 commits intomasterfrom
messages-cleaner
Feb 4, 2026
Merged

fix(server): properly cleanup messages in message cleaner#2670
hubcio merged 4 commits intomasterfrom
messages-cleaner

Conversation

@hubcio
Copy link
Contributor

@hubcio hubcio commented Feb 3, 2026

Segments created after server startup were using the server's
default message_expiry (NeverExpire) rather than the topic's
configured value, causing messages to never be cleaned up even
when expiry was set.

  • Propagate topic's message_expiry to all segment creation sites
  • Move message_expiry config from [system.segment] to [system.topic]
  • Remove delete_oldest_segments toggle
  • Seal segments on rotation so is_expired() can evaluate them
  • Add comprehensive tests for time-based, size-based, and combined

Closes #2629.

@hubcio hubcio changed the title messages cleaner fix(server): segments inherit topic's message_expiry instead of server default Feb 3, 2026
@hubcio hubcio changed the title fix(server): segments inherit topic's message_expiry instead of server default fix(server): properly cleanup messages in messages_cleaner.rs Feb 3, 2026
@hubcio hubcio changed the title fix(server): properly cleanup messages in messages_cleaner.rs fix(server): properly cleanup messages in message cleaner Feb 3, 2026
@hubcio hubcio force-pushed the messages-cleaner branch 2 times, most recently from b9d2bc5 to 0fe9061 Compare February 3, 2026 14:07
…r default

Segments created after server startup were using the server's
default message_expiry (NeverExpire) rather than the topic's
configured value, causing messages to never be cleaned up even
when expiry was set.

- Propagate topic's message_expiry to all segment creation sites
- Move message_expiry config from [system.segment] to [system.topic]
- Remove delete_oldest_segments toggle
- Seal segments on rotation so is_expired() can evaluate them
- Add comprehensive tests for time-based, size-based, and combined

Closes #2629.
@hubcio hubcio merged commit 202fda7 into master Feb 4, 2026
56 checks passed
@hubcio hubcio deleted the messages-cleaner branch February 4, 2026 15:57
krishvishal pushed a commit to krishvishal/iggy that referenced this pull request Feb 9, 2026
Segments created after server startup were using the server's
default message_expiry (NeverExpire) rather than the topic's
configured value, causing messages to never be cleaned up even
when expiry was set.

- Propagate topic's message_expiry to all segment creation sites
- Move message_expiry config from [system.segment] to [system.topic]
- Remove delete_oldest_segments toggle
- Seal segments on rotation so is_expired() can evaluate them
- Add comprehensive tests for time-based, size-based, and combined

Closes apache#2629.

---------

Co-authored-by: Grzegorz Koszyk <112548209+numinnex@users.noreply.github.com>
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.

Iggy server not deleting expired segments

3 participants