Visitar URL original
Feature | Implement async transaction begin/commit/rollback methods · Issue #113 · dotnet/SqlClient · GitHub
Skip to content

Feature | Implement async transaction begin/commit/rollback methods #113

Description

@roji

.NET Core 3.0 will fill in some missing async APIs (e.g. transaction management), these should be implemented in SqlClient at some point.

https://github.com/dotnet/corefx/issues/35012

Activity

  1. roji commented on May 23, 2019

    @roji
    MemberAuthor

    (note: these should hopefully also make it into .NET Standard 2.1)

  2. Wraith2 commented on May 24, 2019

    @Wraith2
    Contributor

    Is there written guidance anywhere on the suggested patterns of do and don't for implementing IAsyncDisposable?

  3. roji commented on May 24, 2019

    @roji
    MemberAuthor

    I'm not sure there's an "official" guide or anything, but the basic idea is to bring the instance to the same state it would have had if Dispose() was called, except that all I/O and other blocking calls need to be done asynchronously. The rest is going to depend on your specific implementation (e.g. whether any code can be shared between Dispose() and DisposeAsync()).

  4. added this to the milestone on Jul 2, 2019
  5. changed the title [-]Implement new async methods coming in .NET Core 3.0[/-] [+]Implement new async methods in .NET Standard 2.1[/+] on Oct 26, 2019
  6. roji commented on Jul 29, 2020

    @roji
    MemberAuthor

    Note this user complaint about the lack of async transaction APIs: dotnet/efcore#21818. Not sure how complex this is to implement, but I'm hoping it can be done at some point to unblock perf issues such as this.

  7. changed the title [-]Implement new async methods in .NET Standard 2.1[/-] [+]Implement async transaction commit/rollback methods[/+] on Jun 12, 2023
  8. removed this from the milestone on Oct 5, 2024
  9. tastyeggs commented on Jan 24, 2025

    @tastyeggs

    I want to bump up this issue - I think it is important that this be prioritized. At a certain scale and workload type, we hit a ceiling due to this issue, and are forced to do manual transaction management (using BEGIN/COMMIT statements). I'm sure there are many users who aren't aware this issue even exists, and simply scale up their application more than they need to.

  10. nikolai-mb commented on Feb 19, 2025

    @nikolai-mb

    This also seems to be a partial blocker preventing Hangfire from fully adopting the async pattern in the job scheduler if my understanding is correct. Lack of proper async in the SqlClient seems to be causing quite a bit of friction in both MS and third-party libraries alike

  11. mdaigle commented on Mar 27, 2025

    @mdaigle
    Contributor

    Should also cover BeginTransactionAsync

  12. vRune4 commented on Mar 28, 2025

    @vRune4

    At a certain scale and workload type

    I'd like to echo this sentiment. We've been battling thread starvation-like symptoms for months now and seeing that transaction commit is synchronous does little to help us find the real culprit (maybe Commit() is the real culprit in the end for all I know...).

    Also: Our problems started after trying to migrate to Azure. Running on a couple of VMs in a local data center churns out a heckuva lot more IOPS and better latency than what is currently on offer in Azure. We keep throwing more and more vCPUs on the problem but synchronous IO is killing us. (and reading about the sqlclient's connection pool also does little to boost my confidence)

    (For the curious: We had two 4 CPU VMs in a local datacenter. One running SQL Server and another our two services. Now we have 6 vCPUs handling our Managed SQL instance and 4+8 vCPUs for our two containers. Our azure environment can handle less than half the load of our "obsolete" configuration)

  13. changed the title [-]Implement async transaction commit/rollback methods[/-] [+]Implement async transaction begin/commit/rollback methods[/+] on Mar 31, 2025
  14. moved this from To triage to Backlog in SqlClient Boardon Oct 16, 2025
  15. changed the title [-]Implement async transaction begin/commit/rollback methods[/-] [+]Feature | Implement async transaction begin/commit/rollback methods[/+] on Mar 31, 2026
  16. added this to the 8.0.0 milestone on Sep 11, 2026
  17. priyankatiwari08 commented on Sep 17, 2026

    @priyankatiwari08
    Contributor

    /triage

  18. Frulfump commented on Oct 25, 2026

    @Frulfump

    /triage

    Did the triage command fail?

  19. removed their assignment
    on Nov 10, 2026
  20. removed this from the 8.0.0 milestone on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ApprovedUse for Features approved for implementation.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions