-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
notes #55666
notes #55666
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue Details
|
thanks for taking notes @ManickaP. Should? we merge it to keep it with the code? |
I'll transform the comment like notes into real comments and the ones which are pointing out problems into issues. We should not merge this PR. I'll make a different one. Let's not pollute our code base with meeting notes. |
@@ -30,7 +32,11 @@ internal sealed class MsQuicStream : QuicStreamProvider | |||
|
|||
private sealed class State | |||
{ | |||
// CR: We could laverage DangerousAddRef to handle relation between connection and stream and properly order calls to close. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -50,6 +56,7 @@ private sealed class State | |||
// set when ReadState.PendingRead: | |||
public Memory<byte> ReceiveUserBuffer; | |||
public CancellationTokenRegistration ReceiveCancellationRegistration; | |||
// CR: Potentially we could get rid of back reference to the parent object since we don't care about keeping them alive while async msquic call is happening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -65,12 +72,16 @@ private sealed class State | |||
// Resettable completions to be used for multiple calls to send. | |||
public readonly ResettableCompletionSource<uint> SendResettableCompletionSource = new ResettableCompletionSource<uint>(); | |||
|
|||
// CR: We should get rid off it, we're not interested in it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public ShutdownWriteState ShutdownWriteState; | ||
|
||
// Set once writes have been shutdown. | ||
// CR: We should get rid of this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public readonly TaskCompletionSource ShutdownWriteCompletionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); | ||
|
||
// CR: Shutdown should be merged into CloseAsync. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -286,6 +307,8 @@ private CancellationTokenRegistration HandleWriteStartState(CancellationToken ca | |||
} | |||
|
|||
// if token was already cancelled, this would execute synchronously | |||
// CR: we need to track the registration and dispose it even in case of exception thrown outside of this method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -318,6 +341,7 @@ private CancellationTokenRegistration HandleWriteStartState(CancellationToken ca | |||
throw new QuicStreamAbortedException(_state.SendErrorCode); | |||
} | |||
|
|||
// CR: this should be some other exception, we should throw OCE unless CT has been fired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -555,6 +579,7 @@ private void StartShutdown(QUIC_STREAM_SHUTDOWN_FLAGS flags, long errorCode) | |||
QuicExceptionHelpers.ThrowIfFailed(status, "StreamShutdown failed."); | |||
} | |||
|
|||
// CR: We should get rid of this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1146,6 +1171,8 @@ private static void CleanupSendState(State state) | |||
} | |||
|
|||
// TODO prevent overlapping sends or consider supporting it. | |||
// CR: Why do we have 3 version of sending? We should unite as much as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1200,6 +1227,7 @@ private static void CleanupSendState(State state) | |||
return _state.SendResettableCompletionSource.GetTypelessValueTask(); | |||
} | |||
|
|||
// CR: for kestrel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
53eb5cc
to
e672c47
Compare
And comments are here: #55819 |
cc: @geoffkizer @CarnaViire @wfurt