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

client: tsoRequest should return when in dispatching but context done #7862

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

CabinfeverB
Copy link
Member

@CabinfeverB CabinfeverB commented Feb 29, 2024

What problem does this PR solve?

Issue Number: close #7864

What is changed and how does it work?

use select to watch context.Done()

Check List

Tests

  • Unit test

Code changes

Side effects

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

Related changes

Release note

None.

Signed-off-by: Cabinfever_B <[email protected]>
Copy link
Contributor

ti-chi-bot bot commented Feb 29, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label Feb 29, 2024
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 29, 2024
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 1, 2024
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 1, 2024
@HuSharp
Copy link
Member

HuSharp commented Mar 1, 2024

ci panic

panic: [tso] timestamp fallback

goroutine 533993 [running]:
go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x2, 0xc00b726b60, {0x5b28442?, 0x37?, 0x0?})
	/home/runner/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:196 +0x9f
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00b726b60, {0xc0006f9500, 0xc, 0xc})
	/home/runner/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:262 +0x5c2
go.uber.org/zap.(*Logger).Panic(0x6af0d20?, {0x4714c01, 0x18}, {0xc0006f9500, 0xc, 0xc})
	/home/runner/go/pkg/mod/go.uber.org/[email protected]/logger.go:284 +0x68
github.com/pingcap/log.Panic({0x4714c01, 0x18}, {0xc0006f9500, 0xc, 0xc})
	/home/runner/go/pkg/mod/github.com/pingcap/[email protected]/global.go:54 +0x72
github.com/tikv/pd/client.(*tsoClient).compareAndSwapTS(0xc00b9ee100, {0x46e08ee, 0x6}, 0xc00babc880, 0x18df8c9be96, 0x6a7)
	/home/runner/work/pd/pd/client/tso_dispatcher.go:828 +0x12ee
github.com/tikv/pd/client.(*tsoClient).processRequests(0xc00b9ee100, {0x552b120, 0xc00baae520}, {0x46e08ee, 0x6}, 0xc00b3e35e0, {0x0, 0x0, 0x0})
	/home/runner/work/pd/pd/client/tso_dispatcher.go:801 +0x80f
github.com/tikv/pd/client.(*tsoClient).handleDispatcher(0xc00b9ee100, {0x5540058, 0xc00b3e3590}, {0x46e08ee, 0x6}, 0xc00b3e35e0)
	/home/runner/work/pd/pd/client/tso_dispatcher.go:503 +0x1ef8
created by github.com/tikv/pd/client.(*tsoClient).createTSODispatcher in goroutine 533838
	/home/runner/work/pd/pd/client/tso_dispatcher.go:334 +0x84e
FAIL	github.com/tikv/pd/tests/integrations/mcs/tso	77.766s
FAIL

https://github.com/tikv/pd/actions/runs/8107182719/job/22158279341?pr=7862#step:5:38038

@HuSharp
Copy link
Member

HuSharp commented Mar 1, 2024

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2024
@CabinfeverB
Copy link
Member Author

CabinfeverB commented Mar 1, 2024

ci panic

panic: [tso] timestamp fallback

goroutine 533993 [running]:
go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x2, 0xc00b726b60, {0x5b28442?, 0x37?, 0x0?})
	/home/runner/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:196 +0x9f
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00b726b60, {0xc0006f9500, 0xc, 0xc})
	/home/runner/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:262 +0x5c2
go.uber.org/zap.(*Logger).Panic(0x6af0d20?, {0x4714c01, 0x18}, {0xc0006f9500, 0xc, 0xc})
	/home/runner/go/pkg/mod/go.uber.org/[email protected]/logger.go:284 +0x68
github.com/pingcap/log.Panic({0x4714c01, 0x18}, {0xc0006f9500, 0xc, 0xc})
	/home/runner/go/pkg/mod/github.com/pingcap/[email protected]/global.go:54 +0x72
github.com/tikv/pd/client.(*tsoClient).compareAndSwapTS(0xc00b9ee100, {0x46e08ee, 0x6}, 0xc00babc880, 0x18df8c9be96, 0x6a7)
	/home/runner/work/pd/pd/client/tso_dispatcher.go:828 +0x12ee
github.com/tikv/pd/client.(*tsoClient).processRequests(0xc00b9ee100, {0x552b120, 0xc00baae520}, {0x46e08ee, 0x6}, 0xc00b3e35e0, {0x0, 0x0, 0x0})
	/home/runner/work/pd/pd/client/tso_dispatcher.go:801 +0x80f
github.com/tikv/pd/client.(*tsoClient).handleDispatcher(0xc00b9ee100, {0x5540058, 0xc00b3e3590}, {0x46e08ee, 0x6}, 0xc00b3e35e0)
	/home/runner/work/pd/pd/client/tso_dispatcher.go:503 +0x1ef8
created by github.com/tikv/pd/client.(*tsoClient).createTSODispatcher in goroutine 533838
	/home/runner/work/pd/pd/client/tso_dispatcher.go:334 +0x84e
FAIL	github.com/tikv/pd/tests/integrations/mcs/tso	77.766s
FAIL

https://github.com/tikv/pd/actions/runs/8107182719/job/22158279341?pr=7862#step:5:38038

The log is similar to #6698 and #6770, I think the PR not to introduce this problem

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Merging #7862 (92f4887) into master (2e3e4c0) will increase coverage by 0.04%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7862      +/-   ##
==========================================
+ Coverage   73.49%   73.53%   +0.04%     
==========================================
  Files         432      432              
  Lines       47958    47967       +9     
==========================================
+ Hits        35245    35273      +28     
+ Misses       9667     9658       -9     
+ Partials     3046     3036      -10     
Flag Coverage Δ
unittests 73.53% <100.00%> (+0.04%) ⬆️

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

@CabinfeverB
Copy link
Member Author

/hold cancel

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2024
@CabinfeverB
Copy link
Member Author

/merge

Copy link
Contributor

ti-chi-bot bot commented Mar 1, 2024

@CabinfeverB: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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.

Copy link
Contributor

ti-chi-bot bot commented Mar 1, 2024

This pull request has been accepted and is ready to merge.

Commit hash: 2e413ca

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 1, 2024
@ti-chi-bot ti-chi-bot bot merged commit 6cb8917 into tikv:master Mar 1, 2024
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GeTSAsync may be blocked
4 participants