-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
Could easily reproduce this by just trying to add a collaborator to a collection that was already a collaborator.
Sentry Issue: MUSICBRAINZ-SERVER-393
None: Failed query: 'INSERT INTO editor_collection_collaborator (collection, editor) VALUES (?, ?), (?, ?), (?, ?)' (2759152 2142111 2759152 2142111 2759152 2185574) 23505 DBD::Pg::st execute failed: ERROR: duplicate key value violates unique constraint "editor_collection_collaborator_pkey" DETAIL: Key (collection, editor)=(2759152, 2142111) already exists. [for Statement "INSERT INTO editor_collection_collaborator (collection, editor) VALUES (?, ?), (?, ?), (?, ?)" with ParamValues: 1='2759152', 2='2142111', 3='2759152', 4='2142111', 5='2759152', 6='2185574'] Sql::catch {...} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x556ddca16970)) called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 123 Try::Tiny::try(CODE(0x556ddca15f80), Try::Tiny::Catch=REF(0x556ddca15c88)) called at lib/Sql.pm line 117 Sql::do(Sql=HASH(0x556db7f4aa18), "INSERT INTO editor_collection_collaborator (collection, edito"..., 2759152, 2142111, 2759152, 2142111, 2759152, 2185574) called at lib/Sql.pm line 181 Sql::insert_many(Sql=HASH(0x556db7f4aa18), "editor_collection_collaborator", HASH(0x556ddca15958), HASH(0x556da6b823e0), HASH(0x556da6ae5bb8)) called at lib/MusicBrainz/Server/Data/Collection.pm line 410 MusicBrainz::Server::Data::Collection::set_collaborators(MusicBrainz::Server::Data::Collection=HASH(0x556db46575d0), 2759152, ARRAY(0x556dafea33f8)) called at lib/MusicBrainz/Server/Data/Collection.pm line 344 MusicBrainz::Server::Data::Collection::update(MusicBrainz::Server::Data::Collection=HASH(0x556db46575d0), 2759152, HASH(0x556db33902a0)) called at lib/MusicBrainz/Server/Controller/Collection.pm line 312 MusicBrainz::Server::Controller::Collection::edit(MusicBrainz::Server::Controller::Collection=HASH(0x556db649e530), MusicBrainz::Server=HASH(0x556db8180368)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 369 Catalyst::Action::execute(Catalyst::Action=HASH(0x556db668aee0), MusicBrainz::Server::Controller::Collection=HASH(0x556db649e530), MusicBrainz::Server=HASH(0x556db8180368)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 Catalyst::execute(MusicBrainz::Server=HASH(0x556db8180368), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x556db668aee0)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x556db8180368), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x556db668aee0)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 364 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x556db668aee0), MusicBrainz::Server=HASH(0x556db8180368)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/ActionChain.pm line 46 Catalyst::ActionChain::dispatch(Catalyst::ActionChain=HASH(0x556db7ddc140), MusicBrainz::Server=HASH(0x556db8180368)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 170 Catalyst::Controller::_ACTION(MusicBrainz::Server::Controller::Collection=HASH(0x556db649e530), MusicBrainz::Server=HASH(0x556db8180368)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 369 Catalyst::Action::execute(Catalyst::Action=HASH(0x556db6683740), MusicBrainz::Server::Controller::Collection=HASH(0x556db649e530), MusicBrainz::Server=HASH(0x556db8180368)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 Catalyst::execute(MusicBrainz::Server=HASH(0x556db8180368), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x556db6683740)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x556db8180368), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x556db6683740)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 364 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x556d File "Collection.pm", line 410, in MusicBrainz::Server::Data::Collection::set_collaborators }, @$collaborators File "Collection.pm", line 344, in MusicBrainz::Server::Data::Collection::update ) if $update->{collaborators}; File "Collection.pm", line 312, in Catalyst::dispatch $c->model('Collection')->update($collection->id, \%update); File "Server.pm", line 388, in MusicBrainz::Server::__ANON__ $c->$orig(@args) File "Server.pm", line 353, in MusicBrainz::Server::with_translations $code->(); ... (3 additional frame(s) were not displayed)