You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exchange/queue names — Default exchange names (zeta.report.exchange, zeta.heartbeat.exchange), queue prefixes, and Redis key prefixes all switched to zeta:*.
Architecture & Core Refactoring
Interface/Impl split — Most concrete classes (e.g., SingleFlight, CircuitBreaker, ExpireManager, RingManager, HealthView, SreRateLimiter, VersionController, SystemLoadMonitor) are now public interfaces with package‑private implementation classes in impl/ sub‑packages.
CentralDispatcher — Replaces scattered direct calls to CacheSyncPublisher and HotKeyReporter; provides unified recordAccess() and send() coordination.
CacheCompressor abstraction — Value‑level LZ4 compression/decompression via Lz4CacheCompressor (falls back to no‑op if LZ4 unavailable).
Memory‑weighted eviction — New CacheConfig with max‑weight (bytes) and DefaultWeigher to enforce memory‑based limits (overrides entry‑count when set).
@Internal marker — Annotates classes not intended for public API consumption.
New Capabilities
Atomic computeIfAbsent — Uses Caffeine's compute() within stripe lock, eliminating TOCTOU race between lookup and load.
CAS operations — compareAndSet() and compareAndInvalidate() for lock‑free optimistic updates.
Batch get — get(Iterable<String>, Function, ...) for bulk read‑through with per‑key TTL/report control.
Timed refresh scheduler — registerRefresh(), updateRefresh(), unregisterRefresh() with a lazy 2‑thread pool for background periodic refresh.
Per‑key ordered dispatcher — PerKeyOrderedDispatcher ensures FIFO execution of tasks for the same key in both CacheSyncListener and WorkerListener.
Concurrent‑threads interception — New InterceptTrigger.CONCURRENT_THREADS with concurrentThreads() attribute to guard per‑key thread count.
Broadcast control — All invalidate(), putThrough(), invalidateAfterPut() methods now accept an isBroadcastByThisTime parameter; invalidate(keys, false) replaces evictLocal().
Multi‑key mutate‑invalidate — Batch invalidateAfterPut(Map) overload for atomic invalidations.
Fixes & Improvements
Worker broadcast rollback — WorkerBroadcaster.broadcastHot/Cool() returns boolean; ReportConsumer calls rollbackToPreviousState() when broadcast fails, preventing state drift.
INVALIDATE vs REFRESH race — CacheSyncListener tracks recentInvalidated high‑water mark per key, skipping stale REFRESH after an INVALIDATE.
Stale‑return on circuit‑breaker open — HotKeyCache.mapEmpty() now returns the stale CacheEntry (if available) when circuit‑breaker is open, instead of Optional.empty().
ExpireManager centralization — All CacheEntry construction flows through ExpireManager.createBuilder(), applyTtl(), replaceEntryValue(), unifying TTL logic and compression.
Dependency & Build Changes
New dependencies — org.lz4:lz4‑java:1.8.0 (compression), org.apache.lucene:lucene‑core:10.5.0 (root POM) and 9.12.0 (common POM – version mismatch, likely intentional for compatibility).
JaCoCo excludes — Updated package paths from io/github/hyshmily/hotkey/* to io/github/hyshmily/zeta/*.
Main class — WorkerApplication moved to io.github.hyshmily.zeta.worker.
Removed / Deprecated
evictLocal() — Replaced by invalidate(key, false).
putBeforeInvalidate() — Replaced by invalidateAfterPut() with broadcast control.
Batch computeIfAbsent(Collection, Function, ...) — Removed; use single‑key atomics plus new batch get() instead.
HotKey* classes — All renamed to Zeta* (e.g., HotKeyCacheStats → ZetaCacheStats, HotKeyDecision → ZetaDecision).
Old endpoint paths — /actuator/hotkey → /actuator/zeta, /actuator/hotkey/worker/state → /actuator/zeta/worker/state.