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

Disable min request data rate for client streaming calls #259

Merged
merged 6 commits into from
May 22, 2019
Merged

Disable min request data rate for client streaming calls #259

merged 6 commits into from
May 22, 2019

Conversation

JunTaoLuo
Copy link
Contributor

@JunTaoLuo JunTaoLuo commented May 21, 2019

Addresses #15

@JunTaoLuo JunTaoLuo requested review from JamesNK and jtattermusch and removed request for JamesNK and jtattermusch May 21, 2019 04:08
@@ -13,7 +13,7 @@

<!-- static local methods are a C# 8.0 feature -->
<LangVersion>preview</LangVersion>
<NullableContextOptions>enable</NullableContextOptions>
<Nullable>enable</Nullable>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reacting to dotnet/roslyn#35516.

@@ -171,7 +171,7 @@ private static bool TryReadHeader(in ReadOnlySequence<byte> buffer, out bool com
}
else
{
Span<byte> headerData = stackalloc byte[HeaderSize];
Span<byte> headerData = new byte[HeaderSize];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yikes dotnet/roslyn#35764. A broken Roslyn shouldn't make its way into our SDK build though, need to figure out why we are getting a bad compiler.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PR for the fix is already approved. Could just wait for the fix before this change goes in. and revert this workaround.

Copy link
Member

Choose a reason for hiding this comment

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

This isn't blocking anything. Lets wait until the SDK is fixed.

@@ -62,7 +62,7 @@ private static async Task ClientStreamingCallExample(Counter.CounterClient clien
var count = RNG.Next(5);
Console.WriteLine($"Accumulating with {count}");
await call.RequestStream.WriteAsync(new CounterRequest { Count = count });
await Task.Delay(1000);
await Task.Delay(2000);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Setting to 2s to trigger request data rate limit.

@JunTaoLuo JunTaoLuo marked this pull request as ready for review May 21, 2019 05:01
@JunTaoLuo JunTaoLuo requested review from jtattermusch and JamesNK and removed request for jtattermusch May 21, 2019 05:01
Copy link
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

Need unit tests

Copy link
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

Repeat for each test

test/Grpc.AspNetCore.Server.Tests/CallHandlerTests.cs Outdated Show resolved Hide resolved
test/Grpc.AspNetCore.Server.Tests/CallHandlerTests.cs Outdated Show resolved Hide resolved
test/Grpc.AspNetCore.Server.Tests/CallHandlerTests.cs Outdated Show resolved Hide resolved
test/Grpc.AspNetCore.Server.Tests/CallHandlerTests.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@jtattermusch jtattermusch left a comment

Choose a reason for hiding this comment

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

LGTM.

@JamesNK
Copy link
Member

JamesNK commented May 22, 2019

I'm going to merge this because the Roslyn bug is still broken in the latest SDK.

@JamesNK JamesNK merged commit af1bff9 into grpc:master May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants