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

[QUIC] Finalize QUIC stream abort model #32075

Closed
scalablecory opened this issue Feb 10, 2020 · 5 comments
Closed

[QUIC] Finalize QUIC stream abort model #32075

scalablecory opened this issue Feb 10, 2020 · 5 comments
Labels
area-System.Net.Quic enhancement Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@scalablecory
Copy link
Contributor

scalablecory commented Feb 10, 2020

QUIC supports aborting the read or write side of a stream independently from the other side of the stream.

We should determine how to allow a user to do an "abortive dispose" such that all pending I/Os in both directions are aborted.

// TODO do we want this to be a synchronization mechanism to cancel a pending read
// If so, we need to complete the read here as well.
internal override void AbortRead(long errorCode)

// TODO do anything to stop writes?
using CancellationTokenRegistration registration = cancellationToken.Register(() =>
{
bool shouldComplete = false;
lock (_sync)
{
if (_shutdownState == ShutdownWriteState.None)
{
_shutdownState = ShutdownWriteState.Canceled;
shouldComplete = true;
}
}
if (shouldComplete)
{
_shutdownWriteResettableCompletionSource.CompleteException(new OperationCanceledException("Shutdown was canceled"));
}
});

@scalablecory scalablecory added this to the 5.0 milestone Feb 10, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Feb 10, 2020
@scalablecory scalablecory removed the untriaged New issue has not been triaged by the area owner label Feb 10, 2020
@karelz karelz added the enhancement Product code improvement that does NOT require public API changes/additions label Feb 20, 2020
@karelz karelz changed the title Finalize QUIC abort model [QUIC]Finalize QUIC abort model Mar 11, 2020
@karelz karelz changed the title [QUIC]Finalize QUIC abort model [QUIC] Finalize QUIC abort model Mar 11, 2020
@scalablecory scalablecory modified the milestones: 5.0.0, 6.0.0 Aug 11, 2020
@geoffkizer
Copy link
Contributor

Isn't this captured already by #756? What's not captured there?

@ManickaP
Copy link
Member

Should we close this as a dupe of #756?

@CarnaViire
Copy link
Member

I believe we wanted to split #756 into several issues instead #756 (comment)

@scalablecory
Copy link
Contributor Author

Triage: we think the abort APIs will look like this:

class QuicStream
{
    // abortive -- causing any unsent data to be discarded.
    // one direction can be aborted while leaving the other direction open.
    // should cause any outstanding ops to throw StreamAbortedException.
    public void Abort(long errorCode, QuicAbortDirection direction = QuicAbortDirection.Both);
}

[Flags]
enum QuicAbortDirection
{
   Read = 1,
   Write = 2,
   Both = 3
}

@scalablecory scalablecory changed the title [QUIC] Finalize QUIC abort model [QUIC] Finalize QUIC stream abort model Apr 22, 2021
@ManickaP
Copy link
Member

Coverd by #756

@ghost ghost locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Quic enhancement Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

6 participants