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
[Admin] simplify admin server implementation #1364
Conversation
891d577
to
543ad5c
Compare
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.
this makes sense to me!
if handleErr := handler(ctx, data); handleErr != nil { | ||
if errors.Is(handleErr, context.Canceled) { | ||
return status.Error(codes.Canceled, "client canceled") | ||
} else if errors.Is(handleErr, context.DeadlineExceeded) { |
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.
we can actually do without the if-elseif-else
here since we have a return
in each of those clauses
bors merge |
1364: [Admin] simplify admin server implementation r=smnzhu a=smnzhu This simplifies the implementation of admin server to remove the `commandQ`, which reduces the surface area for concurrency bugs. gRPC will automatically create a new thread for each admin command, and the rate of admin commands will likely not reach the point where having a queue will be necessary. Co-authored-by: Simon Zhu <simon.zsiyan@gmail.com>
Build failed: |
bors retry |
1364: [Admin] simplify admin server implementation r=smnzhu a=smnzhu This simplifies the implementation of admin server to remove the `commandQ`, which reduces the surface area for concurrency bugs. gRPC will automatically create a new thread for each admin command, and the rate of admin commands will likely not reach the point where having a queue will be necessary. Co-authored-by: Simon Zhu <simon.zsiyan@gmail.com>
Build failed: |
bors merge |
1364: [Admin] simplify admin server implementation r=smnzhu a=smnzhu This simplifies the implementation of admin server to remove the `commandQ`, which reduces the surface area for concurrency bugs. gRPC will automatically create a new thread for each admin command, and the rate of admin commands will likely not reach the point where having a queue will be necessary. Co-authored-by: Simon Zhu <simon.zsiyan@gmail.com>
Build failed: |
bors merge |
This simplifies the implementation of admin server to remove the
commandQ
, which reduces the surface area for concurrency bugs.gRPC will automatically create a new thread for each admin command, and the rate of admin commands will likely not reach the point where having a queue will be necessary.