deleting a note locks up the server #220
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I see that #198 implemented notifying all known instances about removed notes. It seems this also works for remote notes, which I'm not sure is intended, but as mentioned in the ticket, it locks up the server considerably making it unavailable to the users. I currently run an instance for a mere two people so the load is otherwise fine. Worth noting is that I've configured a relay server, so the server knows a lot of servers.
I've attached some screenshots for context.
If another instance delivers their delete instance to us, that delete activity will not be forwarded. What you may be seeing is that our database schema is unable to store notes without storing their replies. If a remote user deletes a note, local replies/renotes will be cascade-deleted. These cascaded activities will then be delivered.
There was already
91a4f38871
and #215 to try to mitigate the negative performance effects. I think in this special case of cascading we could optimize by not delivering each cascaded delete in a separate HTTP request (if there are multiple notes being deleted).You may also want to take a look at
deliverJobPerSec
in the configuration file and lowering it, it should lower the impact of delivering a large number of activities at once, the delivery should be a bit more spread out.I think part of it is also the SQL queries it does, it does at least two per instance from what I've seen, ideally that'd be optimized somehow. It takes between 300-500msec per SQL query on my instance (which is odd, it all runs from a nvme SSD connected using USB3, so that shouldn't be the bottleneck).
@dwarf this should be greatly improved now with the many optimizations we made (and the separate worker threads).
I'm closing this, but do feel free to ask for a reopen if you still experience issues.