dendrite/setup
Neil 117ed66037
Update NATS to 2.10.20, use SyncAlways (#3418)
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>
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2024-09-10 20:54:38 +02:00
..
base Take advantage of changes in recent Go versions (#3361) 2024-05-01 00:38:36 +00:00
config Make usage of relays optional, avoid DB roundtrips (#3337) 2024-02-28 20:59:34 +01:00
jetstream Update NATS to 2.10.20, use SyncAlways (#3418) 2024-09-10 20:54:38 +02:00
mscs More rows.Close() and rows.Err() (#3262) 2023-11-09 08:42:33 +01:00
process Fix flaky test in process context 2023-05-03 18:21:33 -06:00
flags.go Remove polylith/API mode (#2967) 2023-02-14 12:47:47 +01:00
monolith.go Implement MSC3916 (#3397) 2024-08-16 12:37:59 +02:00