mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 23:22:25 -05:00
[bugfix] concurrent map writes in dereferencer media processing maps (#2964)
* removes the avatar / header deref maps as we now have per-uri status / account locks, adds retries on data-races, adds separate emoji map mutex * work with a copy of account / status for each retry loop * revert to old data race behaviour, it gets too complicated otherwise --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
This commit is contained in:
parent
9caf29bed2
commit
3b7faac604
4 changed files with 78 additions and 113 deletions
|
|
@ -285,7 +285,7 @@ func (d *Dereferencer) enrichStatusSafely(
|
|||
requestUser string,
|
||||
uri *url.URL,
|
||||
status *gtsmodel.Status,
|
||||
apubStatus ap.Statusable,
|
||||
statusable ap.Statusable,
|
||||
) (*gtsmodel.Status, ap.Statusable, bool, error) {
|
||||
uriStr := status.URI
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ func (d *Dereferencer) enrichStatusSafely(
|
|||
requestUser,
|
||||
uri,
|
||||
status,
|
||||
apubStatus,
|
||||
statusable,
|
||||
)
|
||||
|
||||
if gtserror.StatusCode(err) >= 400 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue