mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-10 16:57:29 -06:00
[bugfix] Fix possible race condition in federatingdb (#490)
Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
8e80f983b3
commit
cc5f2e98b7
11 changed files with 131 additions and 220 deletions
7
vendor/github.com/superseriousbusiness/activity/pub/database.go
generated
vendored
7
vendor/github.com/superseriousbusiness/activity/pub/database.go
generated
vendored
|
|
@ -19,12 +19,7 @@ type Database interface {
|
|||
// processes require tight loops acquiring and releasing locks.
|
||||
//
|
||||
// Used to ensure race conditions in multiple requests do not occur.
|
||||
Lock(c context.Context, id *url.URL) error
|
||||
// Unlock makes the lock for the object at the specified id available.
|
||||
// If an error is returned, the lock must have still been freed.
|
||||
//
|
||||
// Used to ensure race conditions in multiple requests do not occur.
|
||||
Unlock(c context.Context, id *url.URL) error
|
||||
Lock(c context.Context, id *url.URL) (unlock func(), err error)
|
||||
// InboxContains returns true if the OrderedCollection at 'inbox'
|
||||
// contains the specified 'id'.
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue