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

locate: refactor RegionRequestSender.SendReqCtx #1565

Merged
merged 5 commits into from
Feb 25, 2025

Conversation

zyguan
Copy link
Contributor

@zyguan zyguan commented Jan 26, 2025

This PR extracts the iteration of retry loop in SendReqCtx into sendReqState.next. We will reuse sendReqState in async client API.

ref #1586

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 Jan 26, 2025
@zyguan zyguan marked this pull request as ready for review January 26, 2025 13:41
@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 Jan 26, 2025
Copy link
Contributor

@cfzjywxk cfzjywxk left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Feb 18, 2025
@cfzjywxk cfzjywxk requested a review from ekexium February 24, 2025 07:29
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 25, 2025
Copy link

ti-chi-bot bot commented Feb 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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:

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

Copy link

ti-chi-bot bot commented Feb 25, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-18 03:48:02.106991621 +0000 UTC m=+933124.503213678: ☑️ agreed by cfzjywxk.
  • 2025-02-25 03:34:05.535755435 +0000 UTC m=+326793.488913700: ☑️ agreed by ekexium.

@ti-chi-bot ti-chi-bot bot merged commit 8f40417 into tikv:master Feb 25, 2025
11 checks passed
@you06
Copy link
Contributor

you06 commented Feb 28, 2025

This commit break the a test in TiDB.

Reproduce

tiup playground --tiflash=0 nightly --mode tikv-slim --kv=3

go test ./tests/realtikvtest/sessiontest -run TestTiKVClientReadTimeout --tags=intest --with-real-tikv=true

Log

    testkit.go:318: 
                Error Trace:    pkg/testkit/testkit.go:318
                                                        pkg/testkit/testkit.go:243
                                                        pkg/testkit/testkit.go:176
                                                        tests/realtikvtest/sessiontest/session_fail_test.go:287
                Error:          Received unexpected error:
                                [127.0.0.1:20160](1) wait recvLoop timeout, timeout:1ms: context deadline exceeded
                                github.com/pingcap/errors.AddStack
                                        external/com_github_pingcap_errors/errors.go:178
                                github.com/pingcap/errors.Trace
                                        external/com_github_pingcap_errors/juju_adaptor.go:15
                                github.com/pingcap/tidb/pkg/store/driver/error.ToTiDBErr
                                        pkg/store/driver/error/error.go:208
                                github.com/pingcap/tidb/pkg/store/copr.(*copIteratorWorker).handleTaskOnce
                                        pkg/store/copr/coprocessor.go:1426
                                github.com/pingcap/tidb/pkg/store/copr.(*liteCopIteratorWorker).liteSendReq
                                        pkg/store/copr/coprocessor.go:1197
                                github.com/pingcap/tidb/pkg/store/copr.(*copIterator).Next
                                        pkg/store/copr/coprocessor.go:1112
                                github.com/pingcap/tidb/pkg/distsql.(*selectResult).fetchResp
                                        pkg/distsql/select_result.go:317
                                github.com/pingcap/tidb/pkg/distsql.(*selectResult).Next
                                        pkg/distsql/select_result.go:382
                                github.com/pingcap/tidb/pkg/executor.(*tableResultHandler).nextChunk
                                        pkg/executor/table_reader.go:612
                                github.com/pingcap/tidb/pkg/executor.(*TableReaderExecutor).Next
                                        pkg/executor/table_reader.go:331
                                github.com/pingcap/tidb/pkg/executor/internal/exec.Next
                                        pkg/executor/internal/exec/executor.go:460
                                github.com/pingcap/tidb/pkg/executor.(*ExplainExec).executeAnalyzeExec
                                        pkg/executor/explain.go:129
                                github.com/pingcap/tidb/pkg/executor.(*ExplainExec).generateExplainInfo
                                        pkg/executor/explain.go:148
                                github.com/pingcap/tidb/pkg/executor.(*ExplainExec).Next
                                        pkg/executor/explain.go:75
                                github.com/pingcap/tidb/pkg/executor/internal/exec.Next
                                        pkg/executor/internal/exec/executor.go:460
                                github.com/pingcap/tidb/pkg/executor.(*ExecStmt).next
                                        pkg/executor/adapter.go:1269
                                github.com/pingcap/tidb/pkg/executor.(*recordSet).Next
                                        pkg/executor/adapter.go:172
                                github.com/pingcap/tidb/pkg/session.GetRows4Test
                                        pkg/session/tidb.go:343
                                github.com/pingcap/tidb/pkg/session.ResultSetToStringSlice
                                        pkg/session/tidb.go:361
                                github.com/pingcap/tidb/pkg/testkit.(*TestKit).ResultSetToResultWithCtx
                                        pkg/testkit/testkit.go:317
                                github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustQueryWithContext
                                        pkg/testkit/testkit.go:243
                                github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustQuery
                                        pkg/testkit/testkit.go:176
                                tests/realtikvtest/sessiontest/sessiontest_test.TestTiKVClientReadTimeout
                                        tests/realtikvtest/sessiontest/session_fail_test.go:287
                                testing.tRunner
                                        GOROOT/src/testing/testing.go:1690
                                runtime.goexit
                                        src/runtime/asm_amd64.s:1700
                Test:           TestTiKVClientReadTimeout
                Messages:       sql:explain analyze select /*+ set_var(tikv_client_read_timeout=1) */ * from t where b > 1, args:[]

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants