Skip to content

Conversation

ManickaP
Copy link
Member

@ManickaP ManickaP commented Jul 14, 2021

@ManickaP ManickaP added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jul 14, 2021
@ghost ghost added the area-System.Net label Jul 14, 2021
@ghost
Copy link

ghost commented Jul 14, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details
Author: ManickaP
Assignees: -
Labels:

* NO MERGE *, area-System.Net

Milestone: -

@wfurt
Copy link
Member

wfurt commented Jul 14, 2021

thanks for taking notes @ManickaP. Should? we merge it to keep it with the code?

@ManickaP
Copy link
Member Author

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.


private sealed class State
{
// CR: We could laverage DangerousAddRef to handle relation between connection and stream and properly order calls to close.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// 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.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// 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.
Copy link
Member Author

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// CR: We should get rid of this
public readonly TaskCompletionSource ShutdownWriteCompletionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);

// CR: Shutdown should be merged into CloseAsync.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

// 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.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throw new QuicStreamAbortedException(_state.SendErrorCode);
}

// CR: this should be some other exception, we should throw OCE unless CT has been fired.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QuicExceptionHelpers.ThrowIfFailed(status, "StreamShutdown failed.");
}

// CR: We should get rid of this
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

// TODO prevent overlapping sends or consider supporting it.
// CR: Why do we have 3 version of sending? We should unite as much as possible.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return _state.SendResettableCompletionSource.GetTypelessValueTask();
}

// CR: for kestrel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ManickaP ManickaP force-pushed the mapichov/code_review branch 2 times, most recently from 53eb5cc to e672c47 Compare July 16, 2021 13:07
@ManickaP
Copy link
Member Author

And comments are here: #55819

@ManickaP ManickaP closed this Jul 19, 2021
@ManickaP ManickaP deleted the mapichov/code_review branch July 19, 2021 08:18
@karelz karelz added this to the 6.0.0 milestone Jul 22, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants