Skip to content

Conversation

@bufferflies
Copy link
Contributor

@bufferflies bufferflies commented Sep 5, 2025

What problem does this PR solve?

Issue Number: Ref #9212

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

Release note

None.

Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 5, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 5, 2025
Signed-off-by: 童剑 <[email protected]>
Signed-off-by: 童剑 <[email protected]>
Signed-off-by: 童剑 <[email protected]>
Signed-off-by: 童剑 <[email protected]>
Signed-off-by: 童剑 <[email protected]>
Signed-off-by: 童剑 <[email protected]>
@bufferflies bufferflies force-pushed the feat/router_grpc_impl branch 3 times, most recently from 44f7459 to 54a2392 Compare October 14, 2025 12:33
@bufferflies bufferflies marked this pull request as ready for review October 14, 2025 12:33
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 14, 2025
@bufferflies bufferflies force-pushed the feat/router_grpc_impl branch 5 times, most recently from e14be22 to 238b1b4 Compare October 15, 2025 04:41
Signed-off-by: 童剑 <[email protected]>
@bufferflies bufferflies force-pushed the feat/router_grpc_impl branch from 238b1b4 to 9a85795 Compare October 15, 2025 08:48
@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 52.22482% with 204 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.88%. Comparing base (9003262) to head (050093d).
⚠️ Report is 10 commits behind head on master.

❌ Your patch check has failed because the patch coverage (52.22%) 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   76.82%   76.88%   +0.06%     
==========================================
  Files         491      492       +1     
  Lines       78473    78504      +31     
==========================================
+ Hits        60283    60354      +71     
+ Misses      14486    14457      -29     
+ Partials     3704     3693      -11     
Flag Coverage Δ
unittests 76.88% <52.22%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bufferflies
Copy link
Contributor Author

/test pull-unit-test-next-gen

@bufferflies
Copy link
Contributor Author

/ping @rleungx @okJiang

PendingPeers: region.GetPendingPeers(),
Buckets: buckets,
}, nil
request.NeedBuckets = !*followerHandle && rc.GetStoreConfig().IsEnableRegionBucket() && request.GetNeedBuckets()
Copy link
Member

Choose a reason for hiding this comment

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

How about wrap a function?

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 three variables from different structures, it seems so strange if a new function needs three parameters.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 29, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 29, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: okJiang
Once this PR has been reviewed and has the lgtm label, please assign husharp for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 29, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-10-29 09:42:44.62911585 +0000 UTC m=+1469670.706368410: ☑️ agreed by okJiang.

// See the License for the specific language governing permissions and
// limitations under the License.

package grpc
Copy link
Member

Choose a reason for hiding this comment

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

Can we choose a better package name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about move this into the pkg/utils/grpcutil/grpcutil.go?

)

// 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) {
Copy link
Member

Choose a reason for hiding this comment

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

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) {
Copy link
Member

Choose a reason for hiding this comment

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

Seems no need to use a new package?

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 31, 2025

@bufferflies: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
non-block/pull-unit-test-next-gen 050093d link false /test pull-unit-test-next-gen
pull-build-next-gen 5d56496 link true /test pull-build-next-gen
pull-build 5d56496 link true /test pull-build
pull-integration-realcluster-test 5d56496 link true /test pull-integration-realcluster-test
pull-unit-test-next-gen 5d56496 link true /test pull-unit-test-next-gen

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

)

// 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) {
Copy link
Member

Choose a reason for hiding this comment

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

in metering?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the dco. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants