Skip to content

v1.1.54

Latest

Choose a tag to compare

@Hyshmily Hyshmily released this 02 Jul 11:24

Highlights

  • Circuit breaker — New HotKeyCircuitBreaker protects remote cache-load suppliers; SingleFlight checks allowRequest() before queuing; returns stale Caffeine entry on open breaker.
  • Null-value cachingNullValue.INSTANCE cached with configurable TTL (default 10s) when reader returns empty.
  • HeavyKeeper rewrite — Sliding-window ring buffer (windows[] + slotSums[]) replaces flat long[]; ConcurrentHashMap<String, Node> + ReentrantLock for TopK membership (hot path lock-free); LongAccumulator for striped count write; locCache memoizes hash+fingerprint+bucket indices; volatile long minPqCount for O(1) fast-rejection; 65536-entry decay LUT; adaptive stripe count; parallel addDirect() batch feed.
  • BufferedCounter replaces Caffeine for reporter counters; configurable buffer/flush/eagerSwap params; HotKeyThreadFactory naming.
  • Parallel ReportConsumerparallelStream() chunked (1000 keys); batch addDirect() TopK feed; pre-allocated nextDecisionVersion(); serial drain avoids AMQP channel contention; fire-and-forget broadcast.
  • State machine cool 15s→10mincoolDurationMs 15000→600000, preCoolGraceMs 5000→60000.
  • SlidingWindowDetector memoryAtomicLong[]AtomicLongArray; ~94% reduction (80MB→5MB/100k keys).
  • Cluster health simplified — Removed degraded flag, manual ring override; minAliveWorkers quorum. Heartbeat defaults: timeout 30s→10s, verify 1500ms→5000ms.

Breaking / API

  • CacheLoader SPIFunction<String, Object>CacheLoader interface.
  • RingManager auto-mode only; addNode()/removeNode()/resetToAuto()/isManualMode() removed.
  • HotKeyEndpoint — Actuator @Endpoint → Spring MVC @RequestMapping.
  • ttlJitterEnabled removed — jitter always on; ratio 0.1→0.05.
  • ClusterHealthView constructor signature changed (no degraded param).

Infrastructure

  • TimeSource — Caches System.currentTimeMillis() on daemon thread (5ms tick); all hot-path expiry migrated.
  • HotKeyThreadFactory — Daemon, named, NORM_PRIORITY; replaces all ad-hoc Thread creation.
  • Dedicated hotKeySyncScheduler — Isolated from reporter flush scheduler.
  • @Scheduled removed — Tasks use ScheduledExecutorService.scheduleWithFixedDelay() directly.