mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 13:22:26 +03:00
Set max age for roomserver input stream to avoid excessive interior deletes (#3145)
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. --------- Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
c08c7405db
commit
e93bdd56fd
2 changed files with 21 additions and 3 deletions
|
@ -48,6 +48,7 @@ var streams = []*nats.StreamConfig{
|
|||
Name: InputRoomEvent,
|
||||
Retention: nats.InterestPolicy,
|
||||
Storage: nats.FileStorage,
|
||||
MaxAge: time.Hour * 24,
|
||||
},
|
||||
{
|
||||
Name: InputDeviceListUpdate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue