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

Internal server error when an automatic series reordering involves multiple of the same entity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2015-10-05
    • None
    • Edit system
    • None

      http://musicbrainz.org/series/18f48e9d-4bb8-49b9-b4b7-123c796e5a6e not sure what the intention is there, but anyway, http://musicbrainz.org/edit/35060505 is stuck because editing the release name triggers an automatic reorder, and we get this:

      Error while processing edit #35060505: Failed query:
              '
              UPDATE l_release_series SET link_order = x.link_order::integer
              FROM (VALUES (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?)) AS x (relationship, link_order)
              WHERE id = x.relationship::integer'
              (761 1 764 1 762 1 763 1 765 1 766 1)
      23505 DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint "l_release_series_idx_uniq"
      DETAIL:  Key (entity0, entity1, link, link_order)=(846904, 220, 167218, 1) already exists. at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Connector.pm line 42.
      
       at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 113.
              Sql::catch {...} ('23505 DBD::Pg::st execute failed: ERROR:  duplicate key value...') called at /usr/share/perl5/Try/Tiny.pm line 104
              Try::Tiny::try('CODE(0xd058678)', 'Try::Tiny::Catch=REF(0xd072748)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 114
              Sql::do('Sql=HASH(0x3ea2888)', '\x{a}        UPDATE l_release_series SET link_order = x.link_orde...', 761, 1, 764, 1, 762, 1, 763, ...) called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Data/Series.pm line 330
              MusicBrainz::Server::Data::Series::automatically_reorder('MusicBrainz::Server::Data::Series=HASH(0xd02a9b0)', 220) called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Data/Series.pm line 345
              MusicBrainz::Server::Data::Series::reorder_for_entities('MusicBrainz::Server::Data::Series=HASH(0xd02a9b0)', 'release', 846904) called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Data/Release.pm line 763
              MusicBrainz::Server::Data::Release::update('MusicBrainz::Server::Data::Release=HASH(0xcfd5b70)', 846904, 'HASH(0xcf93ac8)') called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 50
              MusicBrainz::Server::Data::Release::_wrapped_update('MusicBrainz::Server::Data::Release=HASH(0xcfd5b70)', 846904, 'HASH(0xcf93ac8)') called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 95
              MusicBrainz::Server::Data::Release::update('MusicBrainz::Server::Data::Release=HASH(0xcfd5b70)', 846904, 'HASH(0xcf93ac8)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Edit/Generic/Edit.pm line 78
              MusicBrainz::Server::Edit::Generic::Edit::try {...} () called at /usr/share/perl5/Try/Tiny.pm line 81
              eval {...} called at /usr/share/perl5/Try/Tiny.pm line 72
              Try::Tiny::try('CODE(0xcfd5b28)', 'Try::Tiny::Catch=REF(0xd030940)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Edit/Generic/Edit.pm line 96
              MusicBrainz::Server::Edit::Generic::Edit::__ANON__('MusicBrainz::Server::Edit::Release::Edit=HASH(0xd0178c8)') called at /usr/lib/perl5/Moose/Meta/Method/Overridden.pm line 38
              MusicBrainz::Server::Edit::Generic::Edit::accept('MusicBrainz::Server::Edit::Release::Edit=HASH(0xd0178c8)') called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 44
              MusicBrainz::Server::Edit::Release::Edit::_wrapped_accept('MusicBrainz::Server::Edit::Release::Edit=HASH(0xd0178c8)') called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 95
              MusicBrainz::Server::Edit::Release::Edit::accept('MusicBrainz::Server::Edit::Release::Edit=HASH(0xd0178c8)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Data/Edit.pm line 682
              MusicBrainz::Server::Data::Edit::try {...} () called at /usr/share/perl5/Try/Tiny.pm line 76
              eval {...} called at /usr/share/perl5/Try/Tiny.pm line 72
              Try::Tiny::try('CODE(0x41a9780)', 'Try::Tiny::Catch=REF(0xd017898)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Data/Edit.pm line 717
              MusicBrainz::Server::Data::Edit::_do_accept('MusicBrainz::Server::Data::Edit=HASH(0x4190d48)', 'MusicBrainz::Server::Edit::Release::Edit=HASH(0xd0178c8)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Data/Edit.pm line 756
              MusicBrainz::Server::Data::Edit::__ANON__('MusicBrainz::Server::Edit::Release::Edit=HASH(0xd0178c8)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Data/Edit.pm line 779
              MusicBrainz::Server::Data::Edit::_close('MusicBrainz::Server::Data::Edit=HASH(0x4190d48)', 'MusicBrainz::Server::Edit::Release::Edit=HASH(0xd0178c8)', 'CODE(0xcfd4da8)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/Data/Edit.pm line 756
              MusicBrainz::Server::Data::Edit::accept('MusicBrainz::Server::Data::Edit=HASH(0x4190d48)', 'MusicBrainz::Server::Edit::Release::Edit=HASH(0xd0178c8)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/EditQueue.pm line 159
              MusicBrainz::Server::EditQueue::_process_open_edit('MusicBrainz::Server::EditQueue=HASH(0x3e9da80)', 'MusicBrainz::Server::Edit::Release::Edit=HASH(0xd0178c8)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/EditQueue.pm line 121
              MusicBrainz::Server::EditQueue::_process_edit('MusicBrainz::Server::EditQueue=HASH(0x3e9da80)', 35060505) called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/EditQueue.pm line 78
              MusicBrainz::Server::EditQueue::__ANON__() called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 317
              Sql::try {...} () called at /usr/share/perl5/Try/Tiny.pm line 81
              eval {...} called at /usr/share/perl5/Try/Tiny.pm line 72
              Try::Tiny::try('CODE(0x394b960)', 'Try::Tiny::Catch=REF(0x3e36908)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 330
              Sql::_auto_transaction('CODE(0x4190a78)', 'Sql=HASH(0x3ea2888)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 335
              Sql::_run_in_transaction_one('CODE(0x4190a78)', 'Sql=HASH(0x3ea2888)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 349
              Sql::run_in_transaction('CODE(0x4190a78)', 'Sql=HASH(0x3ea2888)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/EditQueue.pm line 79
              MusicBrainz::Server::EditQueue::try {...} () called at /usr/share/perl5/Try/Tiny.pm line 81
              eval {...} called at /usr/share/perl5/Try/Tiny.pm line 72
              Try::Tiny::try('CODE(0x3ea9958)', 'Try::Tiny::Catch=REF(0x4190dc0)') called at /home/musicbrainz/musicbrainz-server/admin/../lib/MusicBrainz/Server/EditQueue.pm line 87
              MusicBrainz::Server::EditQueue::process_edits('MusicBrainz::Server::EditQueue=HASH(0x3e9da80)') called at ./admin/CheckVotes.pl line 56
       at /home/musicbrainz/musicbrainz-server/admin/../lib/Sql.pm line 330.
      

            bitmap Michael Wiencek
            bitmap Michael Wiencek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2015-10-05