-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
store/copr: optimize copIterator by avoid start new goroutine #57522
Merged
Merged
Changes from 60 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
4637ae4
avoid goroutine for when only have 1 cop task
crazycs520 9708f39
tiny refine
crazycs520 77c6ff6
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 208d2f6
remove debug log
crazycs520 e2b5988
fix bug
crazycs520 2838317
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 0b09caa
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 3ab1142
fix test
crazycs520 ffdb115
init
crazycs520 90b1266
refine
crazycs520 7493230
refine
crazycs520 9b21d17
refine
crazycs520 0adfd32
refine
crazycs520 d42989f
fix test
crazycs520 986275f
fix test
crazycs520 5bd2cab
skip test
crazycs520 4dd1749
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 3936e38
fix test
crazycs520 231f80b
refine
crazycs520 328f78d
refactor
crazycs520 8e23f99
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 2525b37
fix test
crazycs520 74c705c
refactor
crazycs520 d75b47c
fix test
crazycs520 62659f1
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 cc5b429
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 05c68e5
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 e3cc04b
fix test
crazycs520 b2e5621
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 640ba95
tiny fix
crazycs520 6dd743d
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 814379a
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 cd8962d
refine
crazycs520 d9dd69f
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 b218c8e
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 f6d6b23
fix test
crazycs520 e103ffa
address comment
crazycs520 9c56def
fix for batch_tasks
crazycs520 b88709a
address comment
crazycs520 9bf22a9
fix test
crazycs520 0243265
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 f88c931
address comment
crazycs520 cfbf4f9
refine comment
crazycs520 632f81f
address comment
crazycs520 3e516f3
refactor
crazycs520 a832de9
refine
crazycs520 05253f4
refine
crazycs520 c652cf9
refine
crazycs520 0854b6e
remove lite worker
crazycs520 5324833
tiny fix
crazycs520 2e6c5c7
fix ci lint
crazycs520 c4cf2d5
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 c2e8f01
refine
crazycs520 0fc1818
refine
crazycs520 e382b9c
add test
crazycs520 53010ee
fix ci lint
crazycs520 0339fd2
Revert "remove lite worker"
crazycs520 a221597
refine comment
crazycs520 03f245a
fix bug
crazycs520 d4f5b0b
fix
crazycs520 3a6f46e
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 6355e0d
fix bug
crazycs520 307eeba
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 a3c7e53
add test case
crazycs520 e3f13d1
refine
crazycs520 fdeff5b
Merge branch 'master' of https://github.com/pingcap/tidb into opt-cop…
crazycs520 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined that the
TryCopLiteWorker
is a request level option.Like an index lookup with 1 row result set. If
TryCopLiteWorker
is a session level option, it's only enabled once in index scan, and in table lookup, theatomic.CompareAndSwapUint32(tryCopLiteWorker, 0, 1)
will fail and execute with multi-goroutine model.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid that make
TryCopLiteWorker
inrequest
level option may have similar problem in this comment, there is a known case and I have added test for it. And I'm not sure if there are other cases like this, so I prefer keepTryCopLiteWorker
to be statement level.As index lookup with 1 row result set, you are right, but because of the above problems, I don't have a good way to fix this.