Possible for song to try and save same song twice, must be issue with SingleSong match, DiscogsSongMatch

Description

Possible for song to try and save same song twice, must be issue with SingleSong match, DsiscogsSOngMatch

11/06/2020 13.56.15:ACST:MusicBrainzUpdateSong:findArtistImages:SEVERE: FindArtistImages:Groove Station:Found:0
11/06/2020 13.56.15:ACST:FileRenamer:renameFilenameBasedOnMetadata:WARNING: New SubFolder/Filename Path is(1):Various Artists\Hits of the 60s\Adam Faith - Hits of the 60s - 03 - 11 - A Message to Martha (Kentucky Bluebird).flac
11/06/2020 13.56.15:ACST:SessionUtil:commitAndClose:SEVERE: could not execute statement
org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:72)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:104)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)
at com.jthink.songkong.util.SessionUtil.commitAndClose(SessionUtil.java:51)
at com.jthink.songkong.util.SessionUtil.commitAndClose(SessionUtil.java:109)
at com.jthink.songkong.analyse.analyser.SongSaver.saveChanges(SongSaver.java:257)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:194)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:51)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Unique index or primary key violation: "PRIMARY KEY ON PUBLIC.SONGDIFF(RECNO) [145, CAST(REPEAT('00', 9381) AS BINARY /* table: 70 id: 7981 */)]"; SQL statement:
insert into SongDiff (diff, recNo) values (?, ?) [23505-199]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:457)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:131)
at org.h2.mvstore.db.MVTable.addRow(MVTable.java:546)
at org.h2.command.dml.Insert.insertRows(Insert.java:180)
at org.h2.command.dml.Insert.update(Insert.java:132)
at org.h2.command.CommandContainer.update(CommandContainer.java:133)
at org.h2.command.Command.executeUpdate(Command.java:267)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:200)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:154)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:147)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
... 21 more
11/06/2020 13.56.15:ACST:Errors:addError:SEVERE: Adding Error:could not execute statement
java.lang.Exception
at com.jthink.songkong.analyse.general.Errors.addError(Errors.java:28)
at com.jthink.songkong.util.SessionUtil.commitAndClose(SessionUtil.java:80)
at com.jthink.songkong.util.SessionUtil.commitAndClose(SessionUtil.java:109)
at com.jthink.songkong.analyse.analyser.SongSaver.saveChanges(SongSaver.java:257)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:194)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:51)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
11/06/2020 13.56.15:ACST:FileRenamer:renameFilenameBasedOnMetadata:WARNING: New SubFolder/Filename Path is(1):Absolutely Fabulous\Absolutely Fabulous\Absolutely Fabulous - Absolutely Fabulous - 01 - Absolutely Fabulous.mp3
11/06/2020 13.56.15:ACST:FileRenamer:renameFilenameBasedOnMetadata:WARNING: New SubFolder/Filename Path is(1):Absolutely Fabulous\Absolutely Fabulous\Absolutely Fabulous - Absolutely Fabulous - 01 - Absolutely Fabulous.mp3

Activity

Show:
IJabz
June 12, 2020, 12:48 AM
Edited

Logs shows

11/06/2020 19.01.55:ACST:MonitorExecutors:outputPipelines:SEVERE: DiscogsSongGroupMatcher:0:0:0:0
11/06/2020 19.01.55:ACST:MonitorExecutors:outputPipelines:SEVERE: MusicBrainzSongMatcher:2127:1949:1962:2127
11/06/2020 19.01.55:ACST:MonitorExecutors:outputPipelines:SEVERE: DiscogsSongMatcher:280:272:280:280
11/06/2020 19.01.55:ACST:MonitorExecutors:outputPipelines:SEVERE: DiscogsUpdateSongGroup:131:117:131:11164
11/06/2020 19.01.55:ACST:MonitorExecutors:outputPipelines:SEVERE: SongSaver:1949:1860:1860:12982

indicating DiscogsUpdateSongGroup called from MusicBrainzUpdateSong with too many songs ?

IJabz
June 12, 2020, 2:36 AM

Also:
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: DbConnectionsOpen:-118
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: SongPreMatcherMatcher:0:0:0:0
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: NaimMatcher:0:0:0:0
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: AcoustidSubmitter:0
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: StartMatcher:1:1:1:34
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: MusicBrainzSongGroupMatcher1:1:1:1:34
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: MusicBrainzUpdateSongOnly:0:0:0:0
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: MusicBrainzMetadataMatches:137:137:137:181
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: MusicBrainzSongGroupMatcher2(SubGroupAnalyser):0:0:0:0
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: MusicBrainzSongGroupMatcher3(WithoutDuplicates):2:2:2:34
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: MusicBrainzSongGroupMatcher4(AnalyserArtistFolder):0:0:0:0
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: DiscogsSongGroupMatcher:1:1:1:26
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: MusicBrainzSongMatcher:28:28:28:28
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: DiscogsSongMatcher:286:278:286:286
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: DiscogsUpdateSongGroup:4:4:4:104
11/06/2020 20.46.55:ACST:MonitorExecutors:outputPipelines:SEVERE: SongSaver:34:34:34:134

IJabz
June 12, 2020, 3:28 AM
Edited

Counts for MetadataMatcher and DiscogsSongMatcher were not being reset so misleading.
But counts for DiscogsUpdateSongGroup is being reset and so value shown seems to indicate there is an issue with this.

IJabz
June 16, 2020, 5:36 AM
Edited

Believe caused by MetadataMatcher when calling SongOnlyMatcher was not creating SongGroup properly, it still contained all songIds, SongOnlyMatcher could cope with this but caused problem if it then called DiscogsUpdateGroupMatcher as this tried to process all files in the songGroup

IJabz
June 16, 2020, 5:52 AM

Done.

Fixed

Reporter

IJabz

Labels

None

Forum Username

os

None

Components

Fix versions

Affects versions

Priority

Major