memory sync consistency across tidb node(stats/bindings/... for example) #56741
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.
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.
The text was updated successfully, but these errors were encountered: