Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set max age for roomserver input stream to avoid excessive interior deletes #3145

Merged
merged 3 commits into from
Jul 7, 2023

Conversation

neilalexander
Copy link
Contributor

If old messages build up in the input stream and do not get processed successfully, this can create a significant drift between the stream first sequence and the consumer ack floors, which results in a slow and expensive start-up when interest-based retention is in use.

If a message is sat in the stream for 24 hours, it's probably not going to get processed successfully, so let NATS drop them instead. Dendrite can reconcile by fetching missing events later if it needs to.

@neilalexander neilalexander requested a review from a team as a code owner July 7, 2023 16:09
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.04 ⚠️

Comparison is base (c08c740) 65.24% compared to head (bec088b) 65.21%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3145      +/-   ##
==========================================
- Coverage   65.24%   65.21%   -0.04%     
==========================================
  Files         504      504              
  Lines       56218    56234      +16     
==========================================
- Hits        36680    36672       -8     
- Misses      15717    15739      +22     
- Partials     3821     3823       +2     
Flag Coverage Δ
unittests 49.70% <0.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
setup/jetstream/nats.go 47.97% <0.00%> (-4.89%) ⬇️
setup/jetstream/streams.go 100.00% <ø> (ø)

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@S7evinK S7evinK left a comment

Choose a reason for hiding this comment

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

As already said, thanks!

@S7evinK S7evinK merged commit e93bdd5 into matrix-org:main Jul 7, 2023
18 of 20 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.

2 participants