If your replicated slave threw an error trying to apply packet #104949 (showing the message
ERROR: duplicate key value violates unique constraint "artist_alias_idx_primary"), then you can un-break things by doing the following:
- Get the latest code from the
git checkout master && git pull origin master (OR, if you don’t want to update your code, clear the dbmirror_pending tables instead:
echo 'TRUNCATE dbmirror_pending CASCADE; TRUNCATE dbmirror_pendingdata CASCADE;' | ./admin/psql READWRITE)
- Proceed with replication as normal, either via cron, or by running
You can also re-import from dump 20170605-031203 or later, and replicate from there. We’re very sorry for the inconvenience.
The issue here was caused by a bug in our alias merge code that interacted strangely with dbmirror. Since that code went untouched for years, the trigger for this issue must have been extremely rare. I’ve put in place a fix for the merge logic to ensure it doesn’t happen there again, and am investigating dbmirror’s behavior to see why it didn’t sequence the updates correctly.
We’re happy to announce the release of our May 2017 schema change today! Thanks to all who were patient during today’s downtime as we released everything to our production servers.
This is a fairly minor release as far as schema changes go, but please do report any issues that you come across.
Currently, the only visible change for editors is the ability to add multiple lyrics languages to works. We’ve also modified the schema to support dynamic attributes for entities other than works, but the UI for that won’t be complete for another release or two.
Now, on to the instructions.
Schema Change Upgrade Instructions
Note: Importing the latest data dump is always a valid alternative to running
./upgrade.sh on an existing database, if you’d prefer to also get new data in one go. Just follow the relevant instructions in INSTALL.md. The rest of the instructions here assume an in-place upgrade.
- Make sure
DB_SCHEMA_SEQUENCE is set to 23 in
- If you’re using the live data feed (your
REPLICATION_TYPE is set to
RT_SLAVE), ensure you’ve replicated up to the most recent replication packet available with the old schema. If you’re not sure, run
./admin/replication/LoadReplicationChanges and see what it tells you; if you’re ready to upgrade, it should say “This replication packet matches schema sequence #24, but the database is currently at #23.”
- Take down the web server running MusicBrainz, if you’re running a web server.
- Turn off cron jobs if you’re automatically updating the database via cron jobs.
- Switch to the new code with
git fetch origin followed by
git checkout v-2017-05-15-schema-change.
cpanm --installdeps --notest . (note the dot at the end) to ensure your perl-based dependencies are up to date.
- Downgrade DBD::Pg by running
cpanm TURNSTEP/DBD-Pg-3.5.3.tar.gz (version 3.6.0 breaks things currently).
./upgrade.sh (it may take a while to vacuum at the end).
DB_SCHEMA_SEQUENCE to 24 in
lib/DBDefs.pm as instructed by the output of
- Turn cron jobs back on, if applicable.
- Restart the MusicBrainz web server, if applicable. It’s also recommended you restart redis. If you’re accessing your MusicBrainz server in a web browser, run
npm install followed by
For those curious, here’s the list of resolved tickets (excluding MBS-8393):
- [MBS-9271] – Prevent usernames from being reused
- [MBS-9273] – Fix the a_ins_edit_note function in older setups to not populate edit_note_recipient for own notes
- [MBS-9274] – Fix the edit_note_idx_post_time_edit index in older setups to handle NULL post_time
- [MBS-5452] – Support multiple lyric language values for works
This release brings feature parity with the pre-NGS edit search, thanks to work by yvanzo.
Note: The “My Vote” search condition has been replaced by “Voter,” with sub-condition “is me.”
The git tag is
- [MBS-2673] – Filter by voter
- [MBS-3362] – Filter out own edits
- [MBS-3665] – Inform users of appropriate formats to use for expired/created/closed time or edit/Id ranges
- [MBS-3914] – Filter edit queue by subscribed editors
- [MBS-5681] – Filter by vote
- [MBS-9088] – Search for editor edits fails
- [MBS-9295] – Allow Baidu Baike URLs using current format
The ability of normal users to auto-edit their own release additions within an hour of entering them has been expanded to all entity types, not just releases. There’s also a new feature in the relationship editor dialog to control which relationship credits you’re changing. Thanks to yvanzo for working on those tickets.
We’ve also resolved some more URL cleanup/detection tickets, and fixed a bug in the release editor causing stub releases to get created. Zastai fixed our web service to respect the
Accept: header for search requests (thanks!).
The git tag is
v-2017-03-27 and the complete changelog is below.
- [MBS-8578] – If the checkbox to copy a Medium’s artist credits to the Recording is ticked, the release editor creates a stub and fails to submit relationships/URLs and Mediums
- [MBS-9258] – Web service search requests don’t pass Accept: header to search servlet
- [MBS-9288] – “Change all relationship credits” for source entity has no effect
- [MBS-9289] – Area places map doesn’t display
- [MBS-9290] – “video channel” link type shouldn’t be restricted
- [MBS-9287] – Update the YouTube logo used in the sidebar
- [MBS-8134] – Allow unreviewed edits on new entries for a period of time
- [MBS-8465] – Change similar relationship credits for on the page.
- [MBS-8522] – Add Twitch.tv to video channel relation and video stream auto-selectors
- [MBS-9291] – Add Dailymotion to video channel relation and video stream auto-selectors
Thanks to legoktm, loujin, reosarevok, Zastai, and the volunteer formerly known as yvanz for their contributions, which are listed below. The git tag is
v-2017-03-13. (Apologies that the release came a day late.)
- [MBS-8748] – Excessively long medium names cause horizontal scrolling
- [MBS-8905] – Editing release events in a 1 hour delay should be auto
- [MBS-8927] – Lowering release data quality in a 1 hour delay should be auto
- [MBS-9120] – Adding a setlist or a time to an event that doesn’t have one should be an auto-edit
- [MBS-9129] – JSON WS serializes ratings for Release
- [MBS-9215] – No way to select entity type when creating new attribute
- [MBS-9261] – WS/2 does not allow a search for URLs
- [MBS-9263] – Transclusion Table on MB.o is broken
- [MBS-9264] – Gulpfile fails on leaflet when compiling from source
- [MBS-9266] – Subheader of area pages has extra comma and misses proper i18n
- [MBS-9267] – Release page should display disambiguation comments for Works
- [MBS-9135] – Allow account admins to change usernames
- [MBS-8354] – Replacing hyphen-minus with em-dash should be an auto-edit
- [MBS-9230] – Hook up MusicBrainz to Sentry (replacing Catalyst::Plugin::ErrorCatcher::Email)
- [MBS-9255] – Show recordings length on a Work overview page
- [MBS-9260] – Changing between version of an ellipsis should be an autoedit
- [MBS-9268] – Hide empty columns in relationships table
Mostly a bug-fix release, with a few small improvements. Thanks a lot to yvanz, reosarevok, loujin, and ferbncode for their contributions. The git tag is
- [MBS-8931] – invalid ISRC creates Internal Server Error
- [MBS-9214] – Cover art types tick boxes are listed with scrollbars in Opera 42 Stable
- [MBS-9219] – [Multiple languages] (Basic) is automatically added when editing/saving an editor profile
- [MBS-9246] – Tool-tips displaying “undefined” text
- [MBS-9250] – Places map displays over header menus
- [MBS-9252] – Setup using INSTALL.md: cpanfile missing entry Plack::Middleware::Debug
- [MBS-9211] – Add autoselect, clean-up, and validation + sidebar for LiveFans URLs
- [MBS-9166] – Remove “early” from Guess Case
- [MBS-9176] – Add Release Group page shouldn’t display the artist tabs
- [MBS-9237] – Don’t immediately fill back the default AC while editor is typing
- [MBS-9254] – Show place dates on the Places list for areas
New features include a map of places contained in an area, thanks to work by loujine, and a report of instruments without an image, thanks to yvanz.
More URL cleanup fixes were submitted by yvanz, and a display bug with the locale drop-down was fixed by chirlu. Thanks again to all who contributed this release.
The git tag is
- [MBS-9062] – Correct play.spotify.com → open.spotify.com
- [MBS-8168] – Statistics for label types are missing from the stats pages
- [MBS-8236] – Recognise classicalarchives.com/artist/… URLs
- [MBS-9168] – Specific locales aren’t indented
- [MBS-9224] – The gulpfile sometimes produces a corrupt rev-manifest bundle
- [MBS-9229] – Regression: No longer able to add http://www.bandsintown.com URLs
- [MBS-9232] – Pinterest URL cleanup adds a second /
- [MBS-7795] – Display a map in Areas that shows all the places contained in the area.
- [MBS-9193] – Report instruments with neither image nor Wikidata item
- [MBS-8249] – Standardise and validate Spotify URLs