Does Apache Phoenix automatically invalidate its client-side query result cache when an HBase region split occurs?
0 reputation · 22 May 2023, 18:49 UTC
The goal is to determine whether Apache Phoenix's optional client-side query result cache is automatically invalidated when an HBase region undergoes a split or compaction, so that application developers can decide if manual cache flushing is required to maintain repeatable reads.
The cache is keyed by the SQL statement and bound parameters, but Phoenix does not register listeners for HBase region server events such as splits, flushes or compactions. Consequently, cached result sets can become stale and remain usable until they are evicted by LRU limits, expire after the configured TTL, or are explicitly flushed via the PhoenixConnection API. The community has not converged on a default invalidation policy, leaving users to weigh the performance benefit of caching against the risk of serving outdated data.
Does Phoenix provide any built-in hook to detect region split events and purge matching cache entries?
When automatic invalidation is unavailable, what configuration or application-level practices best balance cache hit rates with consistency requirements?