gotosocial/internal/federation/federatingdb
kim 3cff4b2d7d [chore] various federatingdb tweaks (#4178)
after seeing a potential reported federating worker lockup i decided to start digging into the federatingdb code. this PR encompasses:
- removes one of our last unused interface types `federatingdb.DB{}`, replacing it with a struct type `*federatingdb.DB{}`
- in `transport.dereferenceLocal()` differentiates between an unsupported lookup type and ErrNoEntries to reduce unnecessary calls, and reduce potential lockups that may occur while trying to call our own endpoints that then call `federatingdb.Lock()`
- removes a bunch of the locks on follow state changes since the DB already synchronizes that
- removes the unnecessary `pub.Clock{}` struct field and type passed to the transport controller

frankly it would be great if we could remove the locking in `federatingdb.Lock()` and instead handle it ourselves as it gets very confusing trying to figure out what functions will have locks held. but i guess that's one for when we move further away from the go-fed/activity/pub package usage.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4178
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2025-05-15 09:40:48 +00:00
..
accept.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
announce.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
announce_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
block.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
create.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
create_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
db.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
delete.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
exists.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
federatingdb_test.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
flag.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
follow.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
followers.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
followers_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
following.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
following_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
get.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
inbox.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
inbox_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
like.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
liked.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
lock.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
move.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
move_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
outbox.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
owns.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
reject.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
reject_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
undo.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
update.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00
update_test.go [bugfix] Prevent multiple mentions being created for one mention (#4127) 2025-05-05 09:22:03 +00:00
util.go [chore] various federatingdb tweaks (#4178) 2025-05-15 09:40:48 +00:00