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

memory sync consistency across tidb node(stats/bindings/... for example) #56741

Open
AilinKid opened this issue Oct 21, 2024 · 1 comment
Open
Labels
affects-8.1 This bug affects the 8.1.x(LTS) versions. report/customer Customers have encountered this bug. sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@AilinKid
Copy link
Contributor

Enhancement

for delta stats updates across tidb nodes, the multi writes acorss tidb nodes will finally be converted sequential apply-logs at the stats_meta table via group leader role. so the data consistency is gained in a dependent storage layer, while tidb in-mem stats cache should be notified when the new commits are applied in case of loss of stats renew.As is known to all, tikv component did a great job on consistency guarantee based on raft mechanism, the multi writes at different tikv node will form leader‘s sequential apply-logs and delivered across the raft group members (number basically equal to 3). the consistency can be guaranteed across the group members when one of them is being request because of the apply log is on the same node already.

for delta stats updates across tidb nodes, the multi writes acorss tidb nodes will finally be converted sequential apply-logs at the stats_meta table via group leader role. so the data consistency is gained in a dependent storage layer, while tidb in-mem stats cache should be notified when the new commits are applied in case of loss of stats renew. So we have the cache consistency problem by now.

we don't need to consider a complete cache coherence problem, because the write propagation and transaction serialization have already been guaranteed in storage layer, what we need here is to design a appropriate subscribed or notifying mechanism to make sure all tidb nodes can get them all instantly.

@AilinKid AilinKid added the type/enhancement The issue or PR belongs to an enhancement. label Oct 21, 2024
@AilinKid AilinKid changed the title memory sync consistency across tidb node memory sync consistency across tidb node(stats/bindings/... for example) Oct 21, 2024
@AilinKid
Copy link
Contributor Author

stats part: #54552

@AilinKid AilinKid added the sig/planner SIG: Planner label Oct 21, 2024
@ti-chi-bot ti-chi-bot bot added affects-8.1 This bug affects the 8.1.x(LTS) versions. report/customer Customers have encountered this bug. labels Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.1 This bug affects the 8.1.x(LTS) versions. report/customer Customers have encountered this bug. sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant