ISH-380
Created by pancakes
2 years ago
Jun 21 2024, 06:02 GMT+2
Updated by Laura Hausmann
1 year ago
Sep 18 2024, 18:01 GMT+2
driveFileDelete failures

My background-task queue has about 14 failed driveFileDelete tasks

Exception message The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded. See https://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
Exception source Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch+<ThrowAggregateUpdateConcurrencyExceptionAsync>d__10

Avatar

I've updated the queue service & dashboard to also store/display the stack trace. Obviously this only works for future errors, so please keep an eye out for this happening again & paste the stack trace in here. I've observed the failure myself, but the last time was >1wk ago, and the database entry for the file in question isn't present. I presume it's queuing two delete jobs for the same file? Unsure.

Avatar
Avatar

Are you still experiencing this issue?

Avatar
State: Triaged → Clarification needed
Avatar

Still getting them

System.Net.Http.HttpRequestException: An error occurred while sending the request.
 ---> System.Net.Http.HttpIOException: The response ended prematurely. (ResponseEnded)
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Iceshrimp.ObjectStorage.Core.Models.AwsClient.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Iceshrimp.ObjectStorage.S3.Client.S3Client.DeleteObjectsAsync(DeleteObjectsRequest request)
   at Iceshrimp.ObjectStorage.S3.Client.S3Bucket.DeleteAsync(IReadOnlyList`1 keys)
   at Iceshrimp.Backend.Core.Services.ObjectStorageService.RemoveFilesAsync(String[] filenames) in /_/Iceshrimp.Backend/Core/Services/ObjectStorageService.cs:line 123
   at Iceshrimp.Backend.Core.Queues.BackgroundTaskQueue.ProcessDriveFileExpire(DriveFileDeleteJobData jobData, IServiceProvider scope, CancellationToken token) in /_/Iceshrimp.Backend/Core/Queues/BackgroundTaskQueue.cs:line 151
   at Iceshrimp.Backend.Core.Queues.BackgroundTaskQueue.BackgroundTaskQueueProcessorDelegateAsync(Job job, BackgroundTaskJobData jobData, IServiceProvider scope, CancellationToken token) in /_/Iceshrimp.Backend/Core/Queues/BackgroundTaskQueue.cs:line 29
   at Iceshrimp.Backend.Core.Services.PostgresJobQueue`1.ProcessJobAsync(IServiceScope processorScope, IServiceScope jobScope, CancellationToken token) in /_/Iceshrimp.Backend/Core/Services/QueueService.cs:line 418
Avatar
State: Clarification needed → Triaged
Avatar

That looks like a different issue, hmm.

Project
Iceshrimp.NET
Priority
Normal
N
Type
Bug
B
State
Triaged
T
Assignee
Laura Hausmann
Avatar
Subsystem
Backend
B
Component
Drive
D
Affected version
v2024.1-beta1
V
Target version
v2025.1
V
Released in version
Unreleased