Nandaka / NijieDownloader

nijie.info downloader
http://nandaka.devnull.zone/
60 stars 8 forks source link

[1.0.7.0] Minor problem while processing with DB / Table name = NijieTags #30

Closed reyaz006 closed 6 years ago

reyaz006 commented 10 years ago
System.Data.Entity.Infrastructure.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlServerCe.SqlCeException: A duplicate value cannot be inserted into a unique index. [ Table name = NijieTags,Constraint name = PK_dbo.NijieTags ]
   in System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
   in System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor)
   in System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
   in System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
   in System.Data.Entity.SqlServerCompact.SqlCeMultiCommand.ExecuteNonQuery()
   in System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   in System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)
   in System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary`2 identifierValues, List`1 generatedValues)
   in System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
   ---
   in System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
   in System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   in System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction)
   in System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction)
   in System.Data.Entity.Internal.InternalContext.SaveChanges()
   ---
   in System.Data.Entity.Internal.InternalContext.SaveChanges()
   in NijieDownloader.UI.JobRunner.SaveImageToDB(JobDownloadViewModel job, NijieImage image)

This can be seen in the log, for several images. There are no problems with files themselves. Not sure why this happens, and I'm not using any tags in my job list.

Nandaka commented 10 years ago

ouch, hopefully it is not concurrency issue (if you enable multithread download). can you set the download thread to 1 and see if it still happen?

reyaz006 commented 10 years ago

Just tried it with Concurrent job = 1. It's all the same.

Except I found that it always happens with all the same images. Specifically, with 1 member job, id=105317.

Nandaka commented 10 years ago

can you enable "Trace DB to Log" and upload it to pastebin?

reyaz006 commented 10 years ago

http://pastebin.com/8VLLA8Hi http://pastebin.com/55rnCJRv http://pastebin.com/aPAX4ZgL

photonometric commented 7 years ago

[1.0.7.7] I just downloaded that artist with DB on, using concurrent jobs at both 1 and 2. All behavior nominal and nothing abnormal in the log. Guess this kink might have worked itself out?