-
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
*: use the real StateRemote interface implementation for cached table #30066
Merged
Merged
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
da6625b
apply patch
tiancaiamao 455b2f0
update StateRemote interface and tests
tiancaiamao 587c6d5
Merge branch 'master' into xxx
tiancaiamao aaf7d5b
fmt & cleanup
tiancaiamao 56cbd37
fix CI
tiancaiamao 63a7b68
remove unused code to make lint happy
tiancaiamao f786469
Merge branch 'master' into use-state-remote
tiancaiamao 7cfd87b
address comment
tiancaiamao 7d096bc
make fmt
tiancaiamao caa2adc
address comment
tiancaiamao 34ea02c
Merge branch 'master' into use-state-remote
tiancaiamao 09033d6
make fmt
tiancaiamao 112ed23
Merge branch 'master' into use-state-remote
tiancaiamao 566cfc7
fix CI
tiancaiamao 121b1ca
address comment
tiancaiamao c36c081
Merge branch 'master' into use-state-remote
tiancaiamao f407f9d
Merge branch 'master' into use-state-remote
tiancaiamao e59cc9a
Update table/tables/state_remote_test.go
tiancaiamao 98e9dbf
Update session/bootstrap.go
tiancaiamao 458e25f
Merge branch 'master' into use-state-remote
tiancaiamao 9622ce2
address comment
tiancaiamao 0100a92
Merge branch 'master' into use-state-remote
tiancaiamao 4c4bf5e
Merge branch 'master' into use-state-remote
tiancaiamao ef51f99
fix CI
tiancaiamao 346e357
Merge branch 'master' into use-state-remote
tiancaiamao 708c3ee
Merge branch 'master' into use-state-remote
bb7133 a0c1f55
Merge branch 'master' into use-state-remote
tiancaiamao 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
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
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.
Is it necessary to remove the non-existent or uncached table?
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.
This what I disscussed with @lcwangchao , the additional DML and the DDL operation is not atomic,
so if there are multiple
alter table t cache
alter table t nocache
and they interleave with each other,we can't make sure finally the row is correctly inserted (maybe inserted then deleted by the other DDL unexpectedly)
If we just insert the row but don't remove it, the correctness is fine.
And I'll leave it as an issue and solve it later.
Some possible solutions maybe:
@tangenta
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 prefer to combine 1 and 3. On one hand,
StateRemote
treats the uninitialized lock as None. On the other hand, remove the row when the table is dropped to preventtable_cache_meta
from being too large.