Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-3333

Internal server error when adding AR twice (accidental misclick)

XMLWordPrintable

      Below is the error I got when submitting (Enter Edit) an AR entry (performance of)

      I suspect this is due to the flaky mouse on this laptop I have, which occasionally double-clicks when I click once. So it may be possible to duplicate by clicking on 'enter edit' twice in rapid succession.

      Internal Server Error
      Oops, something went wrong!

      Error:

      Caught exception in MusicBrainz::Server::Controller::Edit::Relationship->create "The edit could not be created.
      POST: $VAR1 =

      { 'type1' => 'work', 'returnto' => 'http://musicbrainz.org/recording/9f877102-afa5-4d98-a5de-3b0b227ea7b5#relate_to', 'ar.link_type_id' => '278', 'ar.end_date.month' => '', 'ar.edit_note' => '', 'ar.begin_date.year' => '', 'type0' => 'recording', 'entity1' => '5b664c2e-a26a-3869-99b3-99b8726b01e3', 'entity0' => '9f877102-afa5-4d98-a5de-3b0b227ea7b5', 'ar.end_date.day' => '', 'ar.begin_date.month' => '', 'ar.end_date.year' => '', 'ar.begin_date.day' => '' }

      ;

      Exception:$VAR1 = 'DBD::Pg::st execute failed: ERROR: duplicate key value violates unique constraint "l_recording_work_idx_uniq"
      DETAIL: Key (entity0, entity1, link)=(4918930, 622982, 27124) already exists. at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 396.
      at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 410
      Sql::_ANON_(\'DBD::Pg::st execute failed: ERROR: duplicate key value viola...\') called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 100
      Try::Tiny::try(\'CODE(0xd7fad18)\', \'Try::Tiny::Catch=REF(0xd7fac70)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 411
      Sql::_select_list(\'Sql=HASH(0x9f8bb48)\', \'INSERT INTO l_recording_work (link,entity1,entity0) VALUES (?...\', \'ARRAY(0xd7fad90)\', \'arrayref\', \'CODE(0x4e4bf38)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 430
      Sql::select_list_of_lists(\'Sql=HASH(0x9f8bb48)\', \'INSERT INTO l_recording_work (link,entity1,entity0) VALUES (?...\', 27124, 622982, 4918930) called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 364
      Sql::select_single_column_array(\'Sql=HASH(0x9f8bb48)\', \'INSERT INTO l_recording_work (link,entity1,entity0) VALUES (?...\', 27124, 622982, 4918930) called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 379
      Sql::select_single_value(\'Sql=HASH(0x9f8bb48)\', \'INSERT INTO l_recording_work (link,entity1,entity0) VALUES (?...\', 27124, 622982, 4918930) called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 146
      Sql::insert_row(\'Sql=HASH(0x9f8bb48)\', \'l_recording_work\', \'HASH(0xd7fa7c0)\', \'id\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Relationship.pm line 362
      MusicBrainz::Server::Data::Relationship::insert(\'MusicBrainz::Server::Data::Relationship=HASH(0xd7fa460)\', \'recording\', \'work\', \'HASH(0xd7fa538)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Edit/Relationship/Create.pm line 161
      MusicBrainz::Server::Edit::Relationship::Create::insert(\'MusicBrainz::Server::Edit::Relationship::Create=HASH(0xd7ccec8)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 396
      MusicBrainz::Server::Data::Edit::_ANON_() called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 264
      Sql::_ANON_() called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 76
      eval

      {...} called at /usr/local/share/perl/5.10.1/Try/Tiny.pm line 67
      Try::Tiny::try(\'CODE(0xd80d250)\', \'Try::Tiny::Catch=REF(0xd517088)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 277
      Sql::_auto_transaction(\'CODE(0xd7a4968)\', \'Sql=HASH(0x9f8bb48)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 282
      Sql::_run_in_transaction_one(\'CODE(0xd7a4968)\', \'Sql=HASH(0x9f8bb48)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 296
      Sql::run_in_transaction(\'CODE(0xd7a4968)\', \'Sql=HASH(0x9f8bb48)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Data/Edit.pm line 443
      MusicBrainz::Server::Data::Edit::create(\'MusicBrainz::Server::Data::Edit=HASH(0x87c4480)\', \'editor_id\', 636, \'privileges\', 0, \'type1\', \'work\', \'type0\', \'recording\', ...) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller.pm line 83
      eval {...}

      called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller.pm line 82
      MusicBrainz::Server::Controller::_insert_edit(\'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0x9a...\', \'MusicBrainz::Server=HASH(0xbd30870)\', \'MusicBrainz::Server::Form::Relationship=HASH(0xbda8450)\', \'edit_type\', 90, \'type0\', \'recording\', \'type1\', \'work\', ...) called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server/Controller/Edit/Relationship.pm line 276
      MusicBrainz::Server::Controller::Edit::Relationship::create(\'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0x9a...\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65
      Catalyst::Action::execute(\'Catalyst::Action=HASH(0x9e72068)\', \'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0x9a...\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      eval

      {...} called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      Catalyst::execute(\'MusicBrainz::Server=HASH(0xbd30870)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0x9e72068)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xbd30870)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0x9e72068)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0x9e72068)\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst/Controller.pm line 110
      Catalyst::Controller::_ACTION(\'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0x9a...\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65
      Catalyst::Action::execute(\'Catalyst::Action=HASH(0x9e71500)\', \'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0x9a...\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      eval {...}

      called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      Catalyst::execute(\'MusicBrainz::Server=HASH(0xbd30870)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0x9e71500)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xbd30870)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0x9e71500)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0x9e71500)\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x2248940)\', \'forward\', \'MusicBrainz::Server=HASH(0xbd30870)\', \'_ACTION\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x2248940)\', \'MusicBrainz::Server=HASH(0xbd30870)\', \'_ACTION\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 377
      Catalyst::forward(\'MusicBrainz::Server=HASH(0xbd30870)\', \'_ACTION\') called at /usr/local/share/perl/5.10.1/Catalyst/Controller.pm line 84
      Catalyst::Controller::_DISPATCH(\'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0x9a...\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65
      Catalyst::Action::execute(\'Catalyst::Action=HASH(0x9e64098)\', \'MusicBrainz::Server::Controller::Edit::Relationship=HASH(0x9a...\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      eval

      {...} called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1665
      Catalyst::execute(\'MusicBrainz::Server=HASH(0xbd30870)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0x9e64098)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute(\'MusicBrainz::Server=HASH(0xbd30870)\', \'MusicBrainz::Server::Controller::Edit::Relationship\', \'Catalyst::Action=HASH(0x9e64098)\') called at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch(\'Catalyst::Action=HASH(0x9e64098)\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward(\'Catalyst::Dispatcher=HASH(0x2248940)\', \'forward\', \'MusicBrainz::Server=HASH(0xbd30870)\', \'/edit/relationship/_DISPATCH\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward(\'Catalyst::Dispatcher=HASH(0x2248940)\', \'MusicBrainz::Server=HASH(0xbd30870)\', \'/edit/relationship/_DISPATCH\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 377
      Catalyst::forward(\'MusicBrainz::Server=HASH(0xbd30870)\', \'/edit/relationship/_DISPATCH\') called at /usr/local/share/perl/5.10.1/Catalyst/Dispatcher.pm line 105
      Catalyst::Dispatcher::dispatch(\'Catalyst::Dispatcher=HASH(0x2248940)\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1611
      Catalyst::dispatch(\'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst/Plugin/Static/Simple.pm line 76
      Class::MOP::Class:::around(\'CODE(0x28a7220)\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 159
      Class::MOP::Method::Wrapped::_ANON_(\'MusicBrainz::Server=HASH(0xbd30870)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/MusicBrainz/Server.pm line 270
      Class::MOP::Class:::around(\'CODE(0x9f2f130)\', \'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 159
      Class::MOP::Method::Wrapped::_ANON_(\'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 89
      MusicBrainz::Server::dispatch(\'MusicBrainz::Server=HASH(0xbd30870)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1952
      eval {...}

      called at /usr/local/share/perl/5.10.1/Catalyst.pm line 1943
      Catalyst::handle_request(\'MusicBrainz::Server\', \'env\', \'HASH(0x3623000)\') called at /home/musicbrainz/musicbrainz-server/script/../lib/Catalyst/Plugin/AutoRestart.pm line 119
      Catalyst::Plugin::AutoRestart::handle_request(\'MusicBrainz::Server\', \'env\', \'HASH(0x3623000)\') called at /usr/local/share/perl/5.10.1/Catalyst/Engine/FastCGI.pm line 149
      Catalyst::Engine::FastCGI::run(\'Catalyst::Engine::FastCGI=HASH(0x35ecbd0)\', \'MusicBrainz::Server\', \'127.0.0.1:55901\', \'HASH(0x1134d48)\') called at /usr/local/share/perl/5.10.1/Catalyst.pm line 2396
      Catalyst::run(\'MusicBrainz::Server\', \'127.0.0.1:55901\', \'HASH(0x1134d48)\') called at ./script/musicbrainz_fastcgi.pl line 28
      at /home/musicbrainz/musicbrainz-server/script/../lib/Sql.pm line 277
      ';
      at /usr/local/share/perl/5.10.1/Catalyst/Action.pm line 65"
      Stack trace:
      line 94 MusicBrainz::Server::Controller
      line 276 MusicBrainz::Server::Controller::Edit::Relationship
      line 270 MusicBrainz::Server
      Request data:

      $VAR1 = {
      'query_parameters' =>

      { 'returnto' => 'http://musicbrainz.org/recording/9f877102-afa5-4d98-a5de-3b0b227ea7b5#relate_to', 'type1' => 'work', 'entity1' => '5b664c2e-a26a-3869-99b3-99b8726b01e3', 'entity0' => '9f877102-afa5-4d98-a5de-3b0b227ea7b5', 'type0' => 'recording' }

      ,
      'body_parameters' =>

      { 'ar.edit_note' => '', 'ar.end_date.month' => '', 'ar.link_type_id' => '278', 'ar.begin_date.year' => '', 'ar.begin_date.month' => '', 'ar.end_date.day' => '', 'ar.begin_date.day' => '', 'ar.end_date.year' => '' }

      };

      URL: http://musicbrainz.org/edit/relationship/create?type0=recording&type1=work&entity0=9f877102-afa5-4d98-a5de-3b0b227ea7b5&entity1=5b664c2e-a26a-3869-99b3-99b8726b01e3&returnto=http%3A%2F%2Fmusicbrainz.org%2Frecording%2F9f877102-afa5-4d98-a5de-3b0b227ea7b5%23relate_to

            acid2 Oliver Charles
            hawke Alex Mauer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                Bug fixes, 2011-09-26