-
Notifications
You must be signed in to change notification settings - Fork 188
*: limit checker error at a finer granularity and auto increase max size #1624
Conversation
e8fd5f0
to
685baf2
Compare
685baf2
to
b7ac2ac
Compare
dm/ctl/common/util.go
Outdated
"github.com/pingcap/dm/pkg/log" | ||
|
||
"github.com/pingcap/dm/dm/config" | ||
"github.com/pingcap/dm/dm/pb" |
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.
fmt
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.
I think this is caused by our make fmt
@Ehco1996 PTAL
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.
our fmt tools just can't group this imports correctly... but you can formart manually - -.
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.
Can you fix these imports manually?
case codes.ResourceExhausted: | ||
matches := re.FindStringSubmatch(err.Error()) | ||
if len(matches) == 3 { | ||
msgSize, err2 := strconv.Atoi(matches[1]) |
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.
Should we increase msgSize a little more?
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.
unit test shows this is enough
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.
Will the result become a little bigger for the second request?
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't decide a reasonable delta for "a little bigger" 🤔
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.
OK, I'm just afraid it's too strict sometimes.
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.
Is there a hard limit of gRPC message size? And how about use next_pow_of_2(msg_size) as the new limit
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.
Is there a hard limit of gRPC message size?
MaxInt. This only has memory affects. next_pow_of_2 seems more like a strategy for container capacity growing, while here I think using exactly the size is OK, because we sent the RPC again in a short time so the response is more likely not changed.
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.
LGTM
//nolint:errcheck | ||
go server.Serve(lis) | ||
|
||
conn, err := grpc.Dial(utils.UnwrapScheme(masterAddr), |
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.
should add defer conn.Close()
here? 🤔
/hold |
/unhold |
/lgtm |
@Ehco1996: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/cc @glorv |
/lgtm |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 62ce2a2
|
/merge |
This pull request has been accepted and is ready to merge. Commit hash: bbc0ca1
|
/run-compatibility-test |
In response to a cherrypick label: new pull request created: #1688. |
What problem does this PR solve?
close #1478
What is changed and how it works?
grpc: received message larger than max (5242885 vs. 4194304)
, increase max message size and retryCheck List
Tests
Related changes