Big code blowout on screen, trying to fix a bad CD (1 or 5) by removing it , then re-entering it later

musicbrainz
error
musicbrainz-server
Tags: #<Tag:0x00007f309b16e040> #<Tag:0x00007f309b16de38> #<Tag:0x00007f309b16dcf8>

#1

Trying to fix ‘Oscar Peterson Plays’ because some song info got imported with the wrong info/metadata. I deleted 1 of 5 CD’s so I could re-enter the correct info later. When I tried to save the edit, I got the following code blowout.

Code blowout

Failed query: ‘UPDATE medium SET position = (SELECT position FROM (VALUES (?::INTEGER, ?::INTEGER), (?::INTEGER, ?::INTEGER), (?::INTEGER, ?::INTEGER), (?::INTEGER, ?::INTEGER)) AS mpos (medium, position) WHERE mpos.medium = medium.id) WHERE id IN (?,?,?,?)’ (2415887 3 2415888 4 2415886 2 2415885 3 2415887 2415888 2415886 2415885) 23505 DBD::Pg::st execute failed: ERROR: duplicate key value violates unique constraint “medium_uniq” DETAIL: Key (release, “position”)=(2237602, 3) already exists. [for Statement “UPDATE medium SET position = (SELECT position FROM (VALUES (?::INTEGER, ?::INTEGER), (?::INTEGER, ?::INTEGER), (?::INTEGER, ?::INTEGER), (?::INTEGER, ?::INTEGER)) AS mpos (medium, position) WHERE mpos.medium = medium.id) WHERE id IN (?,?,?,?)” with ParamValues: 1=‘2415887’, 2=‘3’, 3=‘2415888’, 4=‘4’, 5=‘2415886’, 6=‘2’, 7=‘2415885’, 8=‘3’, 9=‘2415887’, 10=‘2415888’, 11=‘2415886’, 12=‘2415885’] at lib/Sql.pm line 115. Sql::catch {…} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x1834dd80)) called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 124 Try::Tiny::try(CODE(0x17e090d0), Try::Tiny::Catch=REF(0x1816bea8)) called at lib/Sql.pm line 116 Sql::do(Sql=HASH(0x14314e58), “UPDATE medium SET position =\x{a} (SELECT position”…, 2415887, 3, 2415888, 4, 2415886, 2, 2415885, …) called at lib/MusicBrainz/Server/Data/Medium.pm line 288 MusicBrainz::Server::Data::Medium::reorder(MusicBrainz::Server::Data::Medium=HASH(0x12c20558), 2415887, 3, 2415885, 3, 2415888, 4, 2415886, 2, …) called at lib/MusicBrainz/Server/Edit/Release/ReorderMediums.pm line 128 MusicBrainz::Server::Edit::Release::ReorderMediums::accept(MusicBrainz::Server::Edit::Release::ReorderMediums=HASH(0x17e714d8)) called at lib/MusicBrainz/Server/Data/Edit.pm line 755 MusicBrainz::Server::Data::Edit::try {…} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 101 eval {…} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 94 Try::Tiny::try(CODE(0x187e6008), Try::Tiny::Catch=REF(0x1859bcb8)) called at lib/MusicBrainz/Server/Data/Edit.pm line 790 MusicBrainz::Server::Data::Edit::_do_accept(MusicBrainz::Server::Data::Edit=HASH(0x11c99f40), MusicBrainz::Server::Edit::Release::ReorderMediums=HASH(0x17e714d8)) called at lib/MusicBrainz/Server/Data/Edit.pm line 829 MusicBrainz::Server::Data::Edit::ANON(MusicBrainz::Server::Edit::Release::ReorderMediums=HASH(0x17e714d8)) called at lib/MusicBrainz/Server/Data/Edit.pm line 852 MusicBrainz::Server::Data::Edit::_close(MusicBrainz::Server::Data::Edit=HASH(0x11c99f40), MusicBrainz::Server::Edit::Release::ReorderMediums=HASH(0x17e714d8), CODE(0x17820ea0)) called at lib/MusicBrainz/Server/Data/Edit.pm line 829 MusicBrainz::Server::Data::Edit::accept(MusicBrainz::Server::Data::Edit=HASH(0x11c99f40), MusicBrainz::Server::Edit::Release::ReorderMediums=HASH(0x17e714d8)) called at lib/MusicBrainz/Server/Data/Edit.pm line 599 MusicBrainz::Server::Data::Edit::create(MusicBrainz::Server::Data::Edit=HASH(0x11c99f40), “edit_type”, 313, “medium_positions”, ARRAY(0x14408398), “release”, MusicBrainz::Server::Entity::Release=HASH(0x144718c0), “editor”, MusicBrainz::Server::Authentication::User=HASH(0x144087b8), …) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 553 MusicBrainz::Server::Controller::WS::js::Edit::try {…} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 103 eval {…} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 94 Try::Tiny::try(CODE(0x143f30c8), Try::Tiny::Catch=REF(0x14465948)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 571 MusicBrainz::Server::Controller::WS::js::Edit::create_edits(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x13a1b050), MusicBrainz::Server=HASH(0x140dd070), HASH(0x14315758)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 628 MusicBrainz::Server::Controller::WS::js::Edit::ANON() called at lib/Sql.pm line 321 Sql::try {…} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 103 eval {…} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 94 Try::Tiny::try(CODE(0x143923c8), Try::Tiny::Catch=REF(0x14315470)) called at lib/Sql.pm line 334 Sql::_auto_transaction(CODE(0x14324750), Sql=HASH(0x14314e58)) called at lib/Sql.pm line 339 Sql::_run_in_transaction_one(CODE(0x14324750), Sql=HASH(0x14314e58)) called at lib/Sql.pm line 354 Sql::run_in_transaction(CODE(0x14324750), Sql=HASH(0x14314e58)) called at lib/MusicBrainz/Server/Model/MB.pm line 19 MusicBrainz::Server::Model::MB::with_transaction(MusicBrainz::Server::Model::MB=HASH(0x11487fb8), CODE(0x14324750)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 639 MusicBrainz::Server::Controller::WS::js::Edit::submit_edits(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x13a1b050), MusicBrainz::Server=HASH(0x140dd070), HASH(0x14315758)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 603 MusicBrainz::Server::Controller::WS::js::Edit::create(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x13a1b050), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x13edef10), MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x13a1b050), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2057 eval {…} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2057 Catalyst::execute(MusicBrainz::Server=HASH(0x140dd070), “MusicBrainz::Server::Controller::WS::js::Edit”, Catalyst::Action=HASH(0x13edef10)) called at lib/Catalyst/Plugin/Sentry.pm line 23 Catalyst::Plugin::Sentry::execute(MusicBrainz::Server=HASH(0x140dd070), “MusicBrainz::Server::Controller::WS::js::Edit”, Catalyst::Action=HASH(0x13edef10)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x13edef10), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/ActionChain.pm line 46 Catalyst::ActionChain::dispatch(Catalyst::ActionChain=HASH(0x140e7aa8), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 171 Catalyst::Controller::_ACTION(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x13a1b050), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x13ede808), MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x13a1b050), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2057 eval {…} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2057 Catalyst::execute(MusicBrainz::Server=HASH(0x140dd070), “MusicBrainz::Server::Controller::WS::js::Edit”, Catalyst::Action=HASH(0x13ede808)) called at lib/Catalyst/Plugin/Sentry.pm line 23 Catalyst::Plugin::Sentry::execute(MusicBrainz::Server=HASH(0x140dd070), “MusicBrainz::Server::Controller::WS::js::Edit”, Catalyst::Action=HASH(0x13ede808)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x13ede808), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 262 Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x71c8ee0), “forward”, MusicBrainz::Server=HASH(0x140dd070), “_ACTION”) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 242 Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x71c8ee0), MusicBrainz::Server=HASH(0x140dd070), “_ACTION”) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 482 Catalyst::forward(MusicBrainz::Server=HASH(0x140dd070), “_ACTION”) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 135 Catalyst::Controller::_DISPATCH(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x13a1b050), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x13ede3a0), MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x13a1b050), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2057 eval {…} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2057 Catalyst::execute(MusicBrainz::Server=HASH(0x140dd070), “MusicBrainz::Server::Controller::WS::js::Edit”, Catalyst::Action=HASH(0x13ede3a0)) called at lib/Catalyst/Plugin/Sentry.pm line 23 Catalyst::Plugin::Sentry::execute(MusicBrainz::Server=HASH(0x140dd070), “MusicBrainz::Server::Controller::WS::js::Edit”, Catalyst::Action=HASH(0x13ede3a0)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x13ede3a0), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 262 Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x71c8ee0), “forward”, MusicBrainz::Server=HASH(0x140dd070), “/ws/js/edit/_DISPATCH”) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 242 Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x71c8ee0), MusicBrainz::Server=HASH(0x140dd070), “/ws/js/edit/_DISPATCH”) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 482 Catalyst::forward(MusicBrainz::Server=HASH(0x140dd070), “/ws/js/edit/_DISPATCH”) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 108 Catalyst::Dispatcher::dispatch(Catalyst::Dispatcher=HASH(0x71c8ee0), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2003 Catalyst::dispatch(MusicBrainz::Server=HASH(0x140dd070)) called at lib/MusicBrainz/Server.pm line 323 MusicBrainz::Server::ANON() called at lib/MusicBrainz/Server.pm line 298 MusicBrainz::Server::with_translations(MusicBrainz::Server=HASH(0x140dd070), CODE(0x140fbb30)) called at lib/MusicBrainz/Server.pm line 324 Class::MOP::Class:::around(CODE(0x40bf708), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 164 Class::MOP::Method::Wrapped::ANON(MusicBrainz::Server=HASH(0x140dd070)) called at lib/MusicBrainz/Server.pm line 338 Class::MOP::Class:::around(CODE(0x13980108), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 164 Class::MOP::Method::Wrapped::ANON(MusicBrainz::Server=HASH(0x140dd070)) called at lib/MusicBrainz/Server.pm line 378 Class::MOP::Class:::around(CODE(0x13a83df0), MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 164 Class::MOP::Method::Wrapped::ANON(MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 35 MusicBrainz::Server::_wrapped_dispatch(MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 95 MusicBrainz::Server::dispatch(MusicBrainz::Server=HASH(0x140dd070)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2394 Catalyst::try {…} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 103 eval {…} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 94 Try::Tiny::try(CODE(0x1409ac40), Try::Tiny::Catch=REF(0x140405d8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2403 Catalyst::handle_request(“MusicBrainz::Server”, “env”, HASH(0x13cd04c0), “response_cb”, CODE(0x1409a358)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Engine.pm line 800 Catalyst::Engine::ANON(CODE(0x1409a358)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Middleware/HTTPExceptions.pm line 32 Plack::Middleware::HTTPExceptions::try {…} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 103 eval {…} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 94 Try::Tiny::try(CODE(0x14040350), Try::Tiny::Catch=REF(0x7015e98)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Middleware/HTTPExceptions.pm line 41 Plack::Middleware::HTTPExceptions::ANON(CODE(0x1403fae0)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::ANON(CODE(0x135fe410)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::ANON(CODE(0x1081e8b0)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::ANON(CODE(0x11484c80)) called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 377 Starlet::Server::handle_connection(Plack::Handler::Starlet=HASH(0x1147e4b0), HASH(0x13cd04c0), IO::Socket::INET=GLOB(0x11481560), CODE(0x13f2d7c0), “”, “”, “”) called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 190 Starlet::Server::accept_loop(Plack::Handler::Starlet=HASH(0x1147e4b0), CODE(0x13f2d7c0), 30) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Handler/Starlet.pm line 80 Plack::Handler::Starlet::run(Plack::Handler::Starlet=HASH(0x1147e4b0), CODE(0x13f2d7c0)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Loader.pm line 84 Plack::Loader::run(Plack::Loader=HASH(0x18e4a78), Plack::Handler::Starlet=HASH(0x1147e4b0)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Runner.pm line 277 Plack::runner::run(Plack::Runner=HASH(0x18daa98)) called at /home/musicbrainz/carton-local/bin/plackup line 7


#2

@Bitmap or @yvanzo, any idea?


#3

Thanks for having reported it, it is tracked as bug MBS-9305.