Skip to content

Optimise create remixgroups#2125

Open
alastair wants to merge 2 commits into
masterfrom
optimise-create-remixgroups
Open

Optimise create remixgroups#2125
alastair wants to merge 2 commits into
masterfrom
optimise-create-remixgroups

Conversation

@alastair
Copy link
Copy Markdown
Member

Issue(s)

Description
create_remix_groups deletes all remix groups, recreates them, and then marks
every sound that is part of a remix group as dirty. This causes a spike
of 10,000 sounds to be reindexed every hour, when these items almost
never change.

Instead, just mark a sound's sources/remixes as dirty if they are edited/deleted and update them the next time the reindex script runs.

alastair added 2 commits May 19, 2026 14:06
If a sound's sources or remixes change then we need to update both
this sound and the ones on the other end of the relation so that
search works as expected.
If a sound is updated and its sources change perform the mark dirty
operation at the same time that we expire caches and send emails.
This means that relationships will be updated in solr the next time
the update script runs.
This command deletes all remix groups, recreates them, and then marks
every sound that is part of a remix group as dirty. This causes a spike
of 10,000 sounds to be reindexed every hour, when these items almost
never change.
Instead, take advantage of the previous commit to just mark sounds as
dirty directly when their sources/remixes are edited.
Clean up the script a bit to reduce queries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant