Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
MXS-CAPACITY-Q4-2026
Description
As a user, I want the MaxScale Cache Filter to track cache freshness using per-table GTID state, so that cached results are invalidated the moment underlying data changes — not just after a TTL window expires.
Proposed approach (for discussion):
- Maintain a tracking table (in-memory or master table) that records the last GTID at which each table had a DML operation (insert/update/delete/alter).
- Tag each cached query result with the GTID at the time it was generated.
- On cache read, compare the cached result's GTID against the tracking table's latest GTID for the tables involved. If the tracking table is ahead, the entry is stale.
- On a stale hit, fall through to the backend, fetch fresh data, and re-cache with the new GTID.
This should be built as a common capability in the Cache Filter, so any storage backend gets write-triggered invalidation and read-after-write consistency
Also in scope: the cached_data setting for shared storages.
With a shared storage (storage_redis, storage_gridgain) the cached data is the same for all workers, but cached_data=thread_specific still gives each worker its own pending-refresh set, its own set of queries known to be fast (min_query_duration), its own storage instance and its own diagnostics entry. Consequently a stale entry may be refreshed once per worker, each worker must separately learn which queries are fast, and the diagnostics report the same store once per worker. For shared storages the MaxScale-side state should be shared by all workers, and cached_data should only affect private storages. storage_gridgain, which can currently only be used with cached_data=thread_specific, would then need its connection handles per worker inside one storage instance.
Attachments
Issue Links
- relates to
-
MXS-6617 Cache Invalidation for storage_gridgain
-
- Stalled
-