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

EFBookmarkQueueStore.DleteAsync method exception! #6431

Open
zfchai opened this issue Feb 21, 2025 · 2 comments
Open

EFBookmarkQueueStore.DleteAsync method exception! #6431

zfchai opened this issue Feb 21, 2025 · 2 comments

Comments

@zfchai
Copy link

zfchai commented Feb 21, 2025

  • nuget version
<PackageReference Include="Elsa.EntityFrameworkCore" Version="3.3.3" />
  • code position
namespace Elsa.EntityFrameworkCore.Modules.Runtime;

public class EFBookmarkQueueStore : IBookmarkQueueStore
{
    ...
    /// <inheritdoc />
    public async Task<long> DeleteAsync(BookmarkQueueFilter filter, CancellationToken cancellationToken = default)
    {
        return await store.DeleteWhereAsync(filter.Apply, cancellationToken);
    }
    ...
}
  • error display info

Image

  • detailed stack info
System.MissingMethodException
  HResult=0x80131513
  Message=Method not found: 'System.Threading.Tasks.Task`1<Int32> Microsoft.EntityFrameworkCore.RelationalQueryableExtensions.ExecuteDeleteAsync(System.Linq.IQueryable`1<!!0>, System.Threading.CancellationToken)'.
  Source=Elsa.EntityFrameworkCore.Common
  StackTrace:
   在 Elsa.EntityFrameworkCore.Store`2.<DeleteWhereAsync>d__29.MoveNext()
   在 System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   在 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   在 Elsa.EntityFrameworkCore.Store`2.DeleteWhereAsync(Func`2 query, CancellationToken cancellationToken)
Elsa.EntityFrameworkCore.Modules.Runtime.EFBookmarkQueueStore.<DeleteAsync>d__9.MoveNext() 在 Elsa.EntityFrameworkCore.Modules.Runtime\EFBookmarkQueueStore.cs 中: 第 70 行
Elsa.Workflows.Runtime.DefaultBookmarkQueuePurger.<PurgeAsync>d__5.MoveNext()
Elsa.Common.Multitenancy.TaskExecutor.<ExecuteInternalAsync>d__6.MoveNext()
Elsa.Common.Multitenancy.TaskExecutor.<ExecuteTaskAsync>d__3.MoveNext()
Elsa.Common.Multitenancy.EventHandlers.StartRecurringTasks.<>c__DisplayClass5_1.<<TenantActivatedAsync>b__0>d.MoveNext()
Elsa.Common.RecurringTasks.ScheduledTimer.<Callback>d__4.MoveNext()
   在 System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
System.Threading.QueueUserWorkItemCallback.Execute()
System.Threading.ThreadPoolWorkQueue.Dispatch()
System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
@zfchai
Copy link
Author

zfchai commented Feb 21, 2025

  • specific abnormal methods

DeleteWhereAsync invoked method ExecuteDeleteAsync

/// <summary>
/// Deletes entities using a query.
/// </summary>
/// <returns>The number of entities deleted.</returns>
public async Task<long> DeleteWhereAsync(Func<IQueryable<TEntity>, IQueryable<TEntity>> query, CancellationToken cancellationToken = default)
{
    await using var dbContext = await CreateDbContextAsync(cancellationToken);
    var set = dbContext.Set<TEntity>().AsNoTracking();
    var queryable = query(set.AsQueryable());
    return await queryable.ExecuteDeleteAsync(cancellationToken);
}

@sfmskywalker
Copy link
Member

Hi @zfchai ,

  1. Which DB provider are you seeing this with? SQLite, SQL Server, PostgreSQL, MySQl or Oracle? Or perhaps all of them?
  2. Which package versions are you using? Or are you running from source?
  3. Any steps to reproduce this behavior?

@sfmskywalker sfmskywalker moved this to Triage in ELSA 3 Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

No branches or pull requests

2 participants