[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:
kim
2024-06-06 08:50:14 +00:00
committed by GitHub
parent 9caf29bed2
commit 3b7faac604
4 changed files with 78 additions and 113 deletions

View File

@@ -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 {