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

region_request: tiny refactor - init function failpointSendReqResult #1523

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

AndreMouche
Copy link
Member

Wrap the logic of handling failpoint tikvStoreSendReqResult into a function to make the main logic of SendReqCtx function more concise and friendly to maintain.

Signed-off-by: AndreMouche <[email protected]>
@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 16, 2024
@AndreMouche AndreMouche requested review from crazycs520, MyonKeminta and ekexium and removed request for crazycs520 and MyonKeminta December 16, 2024 18:40
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Dec 17, 2024
Comment on lines 1903 to 1910
val, e := util.EvalFailpoint("tikvStoreSendReqResult")
if e != nil {
return
}
errMsg, ok := val.(string)
if !ok {
return
}
Copy link
Contributor

Choose a reason for hiding this comment

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

It's ok to just follow the original pattern if val, err := util.EvalFailpoint("tikvStoreSendReqResult"); err == nil { ..., instead of reformatting it. It's actually the expanded version of the failpoint.Inject pattern.

Signed-off-by: AndreMouche <[email protected]>
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 2, 2025
Signed-off-by: AndreMouche <[email protected]>
@ti-chi-bot ti-chi-bot bot removed the lgtm label Jan 2, 2025
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 2, 2025
@ti-chi-bot ti-chi-bot bot added the lgtm label Jan 2, 2025
Copy link

ti-chi-bot bot commented Jan 2, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekexium, MyonKeminta

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [MyonKeminta,ekexium]

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 ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 2, 2025
Copy link

ti-chi-bot bot commented Jan 2, 2025

[LGTM Timeline notifier]

Timeline:

  • 2024-12-17 02:19:00.510699006 +0000 UTC m=+923330.599501542: ☑️ agreed by ekexium.
  • 2025-01-02 09:41:16.472358825 +0000 UTC m=+602611.828363364: ☑️ agreed by MyonKeminta.
  • 2025-01-02 09:44:15.300511707 +0000 UTC m=+602790.656516247: ✖️🔁 reset by AndreMouche.
  • 2025-01-02 09:45:01.513538429 +0000 UTC m=+602836.869542968: ☑️ agreed by MyonKeminta.
  • 2025-01-02 09:47:48.522376614 +0000 UTC m=+603003.878381152: ☑️ agreed by ekexium.

@ti-chi-bot ti-chi-bot bot merged commit f2025c1 into master Jan 2, 2025
11 checks passed
@ti-chi-bot ti-chi-bot bot deleted the region_request_failpoint_req_result branch January 2, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants