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

Unused URL with gid redirect cannot be deleted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2023-11-27
    • None
    • Scripts
    • None

      2023-11-18T00:15:39.776563Z Removing unused urls
      2023-11-18T00:15:40.419641Z Finding unused entities of type 'url'
      2023-11-18T00:16:31.359326Z Failed query:
      2023-11-18T00:16:31.359405Z     'DELETE FROM url WHERE id = any(?)'
      2023-11-18T00:16:31.359429Z     (ARRAY(0x5603ae88d590))
      2023-11-18T00:16:31.359477Z 23503 DBD::Pg::st execute failed: ERROR:  update or delete on table "url" violates foreign key constraint "url_gid_redirect_fk_new_id" on table "url_gid_redirect"
      2023-11-18T00:16:31.359499Z DETAIL:  Key (id)=(11710193) is still referenced from table "url_gid_redirect". [for Statement "DELETE FROM url WHERE id = any(?)" with ParamValues: 1='{"11710193
      "}']
      2023-11-18T00:16:31.359521Z  at /home/musicbrainz/musicbrainz-server/admin/cleanup/../../lib/Sql.pm line 123.
      2023-11-18T00:16:31.359547Z     Sql::catch {...} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x5603ae99b808)) called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 123
      2023-11-18T00:16:31.359569Z     Try::Tiny::try(CODE(0x5603ae8841e8), Try::Tiny::Catch=REF(0x5603ae8839f0)) called at /home/musicbrainz/musicbrainz-server/admin/cleanup/../../lib/Sql.pm line
      124
      2023-11-18T00:16:31.359589Z     Sql::do(Sql=HASH(0x5603ae84fc50), "DELETE FROM url WHERE id = any(?)", ARRAY(0x5603ae88d590)) called at /home/musicbrainz/musicbrainz-server/admin/cleanup/../
      ../lib/MusicBrainz/Server/Data/URL.pm line 317
      2023-11-18T00:16:31.359615Z     MusicBrainz::Server::Data::URL::delete(MusicBrainz::Server::Data::URL=HASH(0x5603aaf29478), 11710193) called at /home/musicbrainz/musicbrainz-server/admin/cle
      anup/../../lib/MusicBrainz/Script/RemoveEmpty.pm line 122
      2023-11-18T00:16:31.359642Z     MusicBrainz::Script::RemoveEmpty::__ANON__() called at /home/musicbrainz/musicbrainz-server/admin/cleanup/../../lib/Sql.pm line 335
      2023-11-18T00:16:31.359668Z     Sql::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102
      2023-11-18T00:16:31.359689Z     eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93
      2023-11-18T00:16:31.359712Z     Try::Tiny::try(CODE(0x5603aeae05e0), Try::Tiny::Catch=REF(0x5603ae790800)) called at /home/musicbrainz/musicbrainz-server/admin/cleanup/../../lib/Sql.pm line
      348
      2023-11-18T00:16:31.359731Z     Sql::_auto_transaction(CODE(0x5603ae61bac8), Sql=HASH(0x5603ae84fc50)) called at /home/musicbrainz/musicbrainz-server/admin/cleanup/../../lib/Sql.pm line 353
      2023-11-18T00:16:31.359754Z     Sql::_run_in_transaction_one(CODE(0x5603ae61bac8), Sql=HASH(0x5603ae84fc50)) called at /home/musicbrainz/musicbrainz-server/admin/cleanup/../../lib/Sql.pm lin
      e 368
      2023-11-18T00:16:31.359773Z     Sql::run_in_transaction(CODE(0x5603ae61bac8), Sql=HASH(0x5603ae84fc50)) called at /home/musicbrainz/musicbrainz-server/admin/cleanup/../../lib/MusicBrainz/Scr
      ipt/RemoveEmpty.pm line 124
      2023-11-18T00:16:31.359795Z     MusicBrainz::Script::RemoveEmpty::run(MusicBrainz::Script::RemoveEmpty=HASH(0x5603aaf290a0), "url") called at /home/musicbrainz/carton-local/lib/perl5/MooseX/
      Runnable/Invocation.pm line 165
      2023-11-18T00:16:31.359822Z     MooseX::Runnable::Invocation::start_application(Moose::Meta::Class::__ANON__::SERIAL::17=HASH(0x5603a4857638), MusicBrainz::Script::RemoveEmpty=HASH(0x5603aaf
      290a0), "url") called at /home/musicbrainz/carton-local/lib/perl5/MooseX/Runnable/Invocation.pm line 176
      2023-11-18T00:16:31.359845Z     MooseX::Runnable::Invocation::run(Moose::Meta::Class::__ANON__::SERIAL::17=HASH(0x5603a4857638), "url") called at /home/musicbrainz/carton-local/lib/perl5/Moo
      seX/Runnable/Run.pm line 14
      2023-11-18T00:16:31.359860Z     MooseX::Runnable::Run::run_application("MusicBrainz::Script::RemoveEmpty", "url") called at ./admin/cleanup/RemoveEmpty line 11
      2023-11-18T00:16:31.359881Z  at /home/musicbrainz/musicbrainz-server/admin/cleanup/../../lib/Sql.pm line 348. 

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

              Created:
              Updated:
              Resolved:

                Version Package
                2023-11-27