data modification latency enhancement for table cache
Open
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Currently, for the tables which is cached(by `alter table xxx cache`). if there is data modification, the session needs to wait for tidb_table_cache_lease seconds to make sure the cached data is invalidated on all the tidb instances, then proceeds the dml statement.
We need a more efficient way. When executing modification statement on cache tables, notifications should be sent to all other TiDB instances, to invalidate the cached data immediately. In normal case, the wait time should be shorten around milliseconds. In the case when some TiDB instance failing to response, we can fall back to the current wait-for-lease-time-out mechanism.
Contributor guide
Assessment
This issue has not been assessed yet.