github metabrainz/musicbrainz-docker v-2022-05-17-mbdb27

latest releases: v-2024-09-17.0, v-2024-09-02.0, v-2024-09-02...
2 years ago

Breaking changes

This release upgrades to MusicBrainz database schema 27 and search index rebuilder 3 accordingly. It requires to run commands taking down all services during the upgrade.

If your musicbrainz-docker is earlier than v-2021-05-19, you must first update to it (see its release notes) and follow the upgrade instructions below, or remove everything using sudo docker-compose down --rmi local --volumes and reinstall.

Disk space requirements have significantly increased with recording's "first release date" table: 200 GB (or 70 without indexed search).

Upgrade instructions

Assuming your checked out version of musicbrainz-docker is v-2021-05-19 or later, then:

  1. Ensure you’ve replicated up to the most recent replication packet available with the old schema 26. If you’re not sure, run:

    sudo docker-compose exec musicbrainz bash -c ./admin/replication/LoadReplicationChanges

    and see what it tells you; if you’re ready to upgrade, it should say “This replication packet matches schema sequence #\27, but the database is currently at #\26.”

  2. Turn off cron jobs:

    admin/configure rm replication-cron
    sudo docker-compose up -d musicbrainz
  3. If you’re using the live search indexing, stop it and disable it as follows:

    sudo docker-compose stop indexer
    admin/configure rm live-indexing-search
  4. Switch to the new code with:

    git fetch --tags origin
    git checkout v-2022-05-17-mbdb27
    sudo docker-compose build
  5. If you were using the live search indexing, uninstall its triggers as follows:

    sudo docker-compose up -d indexer
    admin/setup-amqp-triggers uninstall
  6. Upgrade the database schema (it may take a while to vacuum at the end, ignore the ending message about DB_SCHEMA_SEQUENCE):

    mkdir -p local/compose && cp -a admin/lib/upgrade-db-schema/musicbrainz-stopped.yml local/compose
    admin/configure add local-compose-musicbrainz-stopped
    sudo docker-compose up -d musicbrainz indexer
    sudo docker-compose exec musicbrainz upgrade-db-schema.sh
  7. If you’re using the web interface or web service, run the following to build new materialized tables. These will take several additional gigabytes of spaces and be kept up-to-date automatically via triggers. For more information, see INSTALL.md.

    sudo docker-compose exec musicbrainz bash -c './admin/BuildMaterializedTables --database=MAINTENANCE all'
  8. If you’re using the live search indexing, install new triggers:

    admin/setup-amqp-triggers install

    then rebuild search indexes which takes hours (or download pre-built search indexes); See Set up search indexes):

    sudo docker-compose exec indexer python -m sir reindex

    and re-enable live search indexing:

    admin/configure add live-indexing-search
  9. Turn cron jobs back on:

    admin/configure rm local-compose-musicbrainz-stopped
    admin/configure add replication-cron
  10. Stop Redis and restart all services:

    sudo docker-compose stop redis
    sudo docker-compose up --build -d

Solved issues

  • Secure published ports in development setup
  • Simplify installing/uninstalling indexer triggers

Other changes

  • Upgrade MusicBrainz Server to v-2022-05-16-schema-change (release notes)
  • Upgrade search indexer rebuilder to v3.0.1 (see v3.0.0 release notes)

Don't miss a new musicbrainz-docker release

NewReleases is sending notifications on new releases.