Commit graph

12 commits

Author SHA1 Message Date
Laura Hausmann
c91a1fa8bc
[backend/signalr] Catch exceptions in event handlers to prevent exceptions from causing backend crashes 2024-11-20 00:48:34 +01:00
Laura Hausmann
7dec2514da
[sln] Apply code style 2024-11-20 00:48:29 +01:00
Laura Hausmann
8340952653
[backend/signalr] Switch to Lazy<T> for NoteResponses in StreamingService 2024-10-31 18:49:36 +01:00
kopper
7173373330
[backend/federation] Improved reply backfill
Instead of backfilling every note we come across that has a reply
collection, only schedule a backfill job if someone wants to see the
replies (on GET MastoAPI /context, or Iceshrimp API /descendants)

Reply backfilling is also done on a ThreadIdOrId basis as opposed to the
previous way of backfilling individual notes. This allows us finer
grained control over the recursion and frees up the job queue, alongside
allowing for easier implementation of context collection backfill in the
future (by mapping each context collection to a thread)

---

Currently, note threads are implicit based on the "threadId" column of a
note, which can be null (where it's the same as the note's "id")

This commit turns note threads into an actual entity, and as a part of
that, makes "threadId" non-nullable (by specifically setting it to "id"
for those cases)

This is done to attach extra metadata to the entire thread, currently
just the time of when it was last backfilled, but more may be added in
the future (the context collection associated with this thread, for example)

---

The data format for backfill jobs have backwards-incompatibly changed
since the introduction of the feature. We can drop all old jobs without
causing too much trouble as they will be re-scheduled on demand

---

Signed-off-by: Laura Hausmann <laura@hausmann.dev>
2024-10-24 21:18:57 +02:00
Laura Hausmann
86a5da5418
[backend/streaming] Switch to WriteLockingHashSet for cached streaming connection data 2024-08-13 17:39:59 +02:00
Laura Hausmann
3132b6b8c9
[backend/core] Fix note thread mute handling inconsistencies 2024-08-13 03:11:09 +02:00
Laura Hausmann
014fa64b43
[backend/signalr] Add NoteDeleted event, update NoteUpdated event 2024-07-13 18:06:23 +02:00
Laura Hausmann
9233e43b81
[backend/api-shared] Don't dispose DbContext prematurely in streaming connection handlers 2024-07-13 15:59:35 +02:00
Laura Hausmann
1d43f2c30b
[backend/api-shared] Add thread mute support (ISH-172) 2024-07-13 01:35:28 +02:00
Laura Hausmann
f42aeee2fd
[backend/api] Add filter endpoints (ISH-339) 2024-07-13 00:36:49 +02:00
Laura Hausmann
68867aee90
[backend/signalr] Remove ExampleHub 2024-07-12 23:50:20 +02:00
Laura Hausmann
3316a391d5
[backend] Refactor SignalR namespace 2024-07-04 18:27:14 +02:00