2017-03-01, 14:18
(2017-03-01, 08:25)DaveBlake Wrote: Cleanup issues
Thanks for the log, it does help me to see details. Of course I want more info.
(2017-02-27, 23:25)Rusendusen Wrote: Kodi was stuck this morning and process still running on DB
Code:46768 | kodi | 192.168.5.7:52982 | MyMusic60 | Query | 35054 | Sending data | delete from artist where idArtist not in (select idArtist from tmp_delartists)
The kodi.log shows it doing the hard part - song paths, slowly but completed - yet as you said hangs on artists.
I can only wonder if the LDP/skin.widgets polling queries somewhow interrupted the cleaning. Did you have the cleaning problem before installing Xonfluence?
I assume that the temp table has gone now, but that the artists haven't. I wonder how many it was trying to delete? Some SQL for you to use to find out.
I'll make a SQL expert of you eventuallyCode:CREATE TEMPORARY TABLE tmp_delartists (idArtist integer) CHARACTER SET utf8 COLLATE utf8_general_ci;
INSERT INTO tmp_delartists select idArtist from song_artist;
INSERT INTO tmp_delartists select idArtist from album_artist;
INSERT INTO tmp_delartists VALUES(1);
SELECT COUNT(1) FROM artist WHERE idArtist NOT IN (SELECT idArtist FROM tmp_delartists);
Copy & paste doesn't make an expert, but I'm learning :-)
Code:
MariaDB [MyMusic60]> CREATE TEMPORARY TABLE tmp_delartists (idArtist integer) CHARACTER SET utf8 COLLATE utf8_general_c;
Query OK, 0 rows affected (0.26 sec)
MariaDB [MyMusic60]> INSERT INTO tmp_delartists select idArtist from song_artist;
Query OK, 362217 rows affected (17.83 sec)
Records: 362217 Duplicates: 0 Warnings: 0
MariaDB [MyMusic60]> INSERT INTO tmp_delartists select idArtist from album_artist;
Query OK, 8344 rows affected (0.35 sec)
Records: 8344 Duplicates: 0 Warnings: 0
MariaDB [MyMusic60]> INSERT INTO tmp_delartists VALUES(1);
Query OK, 1 row affected (0.04 sec)
MariaDB [MyMusic60]> SELECT COUNT(1) FROM artist WHERE idArtist NOT IN (SELECT idArtist FROM tmp_delartists);
+----------+
| COUNT(1) |
+----------+
| 0 |
+----------+
1 row in set (3.64 sec)
Quote:Yes.(2017-02-28, 21:28)Rusendusen Wrote: I have to add for the cleaning part, that there wasn't any artists or folders (re) moved. Last time I scanned source and did some rearrangement in my folder structure, so the cleanup was a 'real' cleanup. The cascades came within seconds up to multiple hours in between each.
Just to confirm by "cascades" do you mean that the MySQL log showed repeats of the set
with hours of "silence" in between each repeat?Code:Query DELETE FROM album_artist WHERE album_artist.idArtist = old.idArtist
Query DELETE FROM song_artist WHERE song_artist.idArtist = old.idArtist
Query DELETE FROM discography WHERE discography.idArtist = old.idArtist
Query DELETE FROM art WHERE media_id=old.idArtist AND media_type='artist'
As the above result was 0, I could move a folder (or rename it, touch it, whatever), update DB and do a cleanup with something to clean and provide a new kodi.log and mysql.log with Estuary and no ldp & skin.helper