Feat(router service): implement grpc function#9723
Feat(router service): implement grpc function#9723ti-chi-bot[bot] merged 15 commits intotikv:masterfrom
Conversation
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
|
Skipping CI for Draft Pull Request. |
328c657 to
67aa227
Compare
Signed-off-by: 童剑 <1045931706@qq.com>
Signed-off-by: 童剑 <1045931706@qq.com>
Signed-off-by: 童剑 <1045931706@qq.com>
Signed-off-by: 童剑 <1045931706@qq.com>
44f7459 to
54a2392
Compare
e14be22 to
238b1b4
Compare
238b1b4 to
9a85795
Compare
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (53.21%) is below the target coverage (74.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #9723 +/- ##
==========================================
- Coverage 78.68% 78.60% -0.08%
==========================================
Files 492 494 +2
Lines 66274 66299 +25
==========================================
- Hits 52148 52115 -33
- Misses 10418 10467 +49
- Partials 3708 3717 +9
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/test pull-unit-test-next-gen |
| PendingPeers: region.GetPendingPeers(), | ||
| Buckets: buckets, | ||
| }, nil | ||
| request.NeedBuckets = !*followerHandle && rc.GetStoreConfig().IsEnableRegionBucket() && request.GetNeedBuckets() |
There was a problem hiding this comment.
The three variables from different structures, it seems so strange if a new function needs three parameters.
pkg/grpc/helper.go
Outdated
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package grpc |
There was a problem hiding this comment.
Can we choose a better package name?
There was a problem hiding this comment.
how about move this into the pkg/utils/grpcutil/grpcutil.go?
pkg/grpc/helper.go
Outdated
| ) | ||
|
|
||
| // IncRegionRequestCounter increments the region request counter with the given method, header, error, and counter. | ||
| func IncRegionRequestCounter(method string, header *pdpb.RequestHeader, err *pdpb.Error, counter *prometheus.CounterVec) { |
There was a problem hiding this comment.
Suggest moving back to metrics.go
| } | ||
|
|
||
| // BatchScanRegions implements gRPC PDServer. | ||
| func BatchScanRegions(rc *core.BasicCluster, request *pdpb.BatchScanRegionsRequest, isFollower bool) (resp *pdpb.BatchScanRegionsResponse, err error) { |
There was a problem hiding this comment.
Seems no need to use a new package?
Signed-off-by: 童剑 <1045931706@qq.com>
pkg/metering/utils.go
Outdated
| ) | ||
|
|
||
| // IncRegionRequestCounter increments the region request counter with the given method, header, error, and counter. | ||
| func IncRegionRequestCounter(method string, header *pdpb.RequestHeader, err *pdpb.Error, counter *prometheus.CounterVec) { |
pkg/utils/grpcutil/metrics.go
Outdated
| ) | ||
|
|
||
| // RegionRequestCounter increments the region request counter with the given method, header, error, and counter. | ||
| func RegionRequestCounter(method string, header *pdpb.RequestHeader, err *pdpb.Error, counter *prometheus.CounterVec) { |
There was a problem hiding this comment.
| func RegionRequestCounter(method string, header *pdpb.RequestHeader, err *pdpb.Error, counter *prometheus.CounterVec) { | |
| func RequestCounter(method string, header *pdpb.RequestHeader, err *pdpb.Error, counter *prometheus.CounterVec) { |
Signed-off-by: 童剑 <1045931706@qq.com>
|
@bufferflies: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/test pull-unit-test-next-gen |
|
/test pull-integration-realcluster-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: okJiang, rleungx The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: Ref #9212
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
pingcap/docs/pingcap/docs-cn:pingcap/tiup:Release note