Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Update NATS to 2.10.20, use SyncAlways #3418

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

neilalexander
Copy link
Contributor

The internal NATS instance is definitely convenient but it does have one problem: its lifecycle is tied to the Dendrite process. That means if Dendrite panics or OOMs, it takes out NATS with it. I suspect this is sometimes contributing to what people see with stuck streams, as some operations or state might not be written to disk fully before it gets interrupted.

Using SyncAlways means that NATS will effectively use O_SYNC and block writes on flushes, which should improve resiliency against this kind of failure considerably. It might affect performance a little but shouldn't be significant.

Also updates NATS to 2.10.20 as there have been all sorts of fixes since 2.10.7, including better SyncAlways handling.

Signed-off-by: Neil Alexander git@neilalexander.dev

Signed-off-by: Neil Alexander <git@neilalexander.dev>
Signed-off-by: Neil Alexander <git@neilalexander.dev>
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.19%. Comparing base (7a4ef24) to head (2459fd2).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3418      +/-   ##
==========================================
- Coverage   68.20%   68.19%   -0.01%     
==========================================
  Files         513      513              
  Lines       47021    47022       +1     
==========================================
- Hits        32070    32067       -3     
- Misses      10952    10960       +8     
+ Partials     3999     3995       -4     
Flag Coverage Δ
unittests 53.31% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Thanks!

@S7evinK S7evinK enabled auto-merge (squash) September 10, 2024 18:52
@S7evinK S7evinK merged commit 117ed66 into matrix-org:main Sep 10, 2024
22 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants