Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DbUpdateConcurrencyException not handled #175

Closed
qdraw opened this issue Oct 24, 2020 · 0 comments · Fixed by #260
Closed

DbUpdateConcurrencyException not handled #175

qdraw opened this issue Oct 24, 2020 · 0 comments · Fixed by #260
Labels
bug Something isn't working

Comments

@qdraw
Copy link
Owner

qdraw commented Oct 24, 2020

Describe the bug

Start indexing /2020/10/2020_10_24
.
/2020/10/2020_10_24  Unhandled exception. Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ThrowAggregateUpdateConcurrencyException(Int32 commandIndex, Int32 expectedRowsAffected, Int32 rowsAffected)
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeResultSetWithoutPropagation(Int32 commandIndex, RelationalDataReader reader)
   at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.Consume(RelationalDataReader reader)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList`1 entries)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList`1 entriesToSave)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(DbContext _, Boolean acceptAllChangesOnSuccess)
   at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
   at starsky.foundation.database.Query.Query.RemoveItem(FileIndexItem updateStatusContent)
   at starskycore.Services.SyncService.CheckMd5Hash(IEnumerable`1 localSubFolderDbStyle, IReadOnlyCollection`1 databaseFileList)
   at starskycore.Services.SyncService.SyncFiles(String subPath, Boolean recursive)
   at starskycore.Services.SyncServiceCli.Sync(String[] args, ISync syncService, AppSettings appSettings, IConsole console, IThumbnailCleaner thumbnailCleaner, ISelectorStorage selectorStorage)
   at starskysynccli.Program.Main(String[] args)
Aborted

Expected behavior
Directory is scanned

@qdraw qdraw added the bug Something isn't working label Oct 24, 2020
@qdraw qdraw linked a pull request Dec 24, 2020 that will close this issue
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant