Skip to content

CacheDB 0.19.4

Latest

Choose a tag to compare

@esasmer-dou esasmer-dou released this 28 Nov 18:57
· 1 commit to main since this release

CacheDB 0.19.4

Java 21+ deep performance, memory, and round-trip optimization release on the 0.19.x line. Every optimization preserves zero runtime reflection, full Public API compatibility, and transparent backward compatibility with existing Redis payloads.

Performance & Memory Improvements

  • Write-Behind Compaction Fix & Pipelined Acknowledgements (cachedb-storage-redis): Fixed a dead-code compaction guard in RedisWriteBehindWorker, pipelined standalone and Cluster XACK + XDEL acknowledgements (including batched deferred ack drains), and upgraded Cluster RedisDurabilityTracker.advanceBatch to EVALSHA with automatic NOSCRIPT/ACL fallback.
  • Indexed Query Planning RTT Reduction (cachedb-storage-redis): Added request-scoped IndexQueryScope memoization in RedisQueryIndexManager (37 → 7 planning RTTs, -81% in combined single-filter and AND query benchmarks), single-check fullyIndexed AST traversal, precomputed child cardinalities, single-RTT EVALSHA Lua scripts for histograms (51 → 1 RTT) and bounded SMEMBERS/ZRANGEBYSCORE (2 → 1 RTT), and cached target index managers.
  • Lock-Free Registry & Plan Caching (cachedb-core, cachedb-storage-jdbc, cachedb-storage-redis, cachedb-starter): Replaced read-locked DefaultEntityRegistry snapshots with a lock-free Copy-On-Write RegistrySnapshot and O(1) findByType (31.6× higher throughput under 8-thread contention with -91% heap allocation), added typed primitive JDBC binding (ColumnKind), precompiled identifier regexes, cached CacheTransactionTemplate / CacheDatabase, and enabled binary projection wire encoding in RedisAtomicWriteBatch.
  • Projection Null-Field Fix & Hydration N+1 Elimination (cachedb-core, cachedb-storage-redis): Fixed a latent ProjectionSchema BINARY_V2 decoding bug where null projection fields could trigger IllegalArgumentException, batched sync/async projection warmup via upsertBatch, wired direct column access and prebuilt comparators into RedisProjectionRepository, batched warm hydration access/reindex calls, and upgraded RedisVersionedHydrator.upsertBatch to EVALSHA.
  • Zero-CAS Binary Codec & Schema Envelope (cachedb-core): Replaced CAS scratch pooling in BinaryPayloadCodec with platform-thread ThreadLocal scratch buffers, single-pass C2-inlined ASCII string encoding, zero-allocation OffsetDateTime encoding, 64-bit lowPresenceMask, cached Enum constant arrays, and binary VERSION_3_ENVELOPE framing for @CacheSchemaVersion > 1 (+18–21% higher throughput with -27% to -38% heap allocation).
  • L1 Near-Cache RAM Redesign & Tracking (cachedb-storage-redis): Eliminated duplicate raw payload retention for deeply-immutable entities via putDecoded (3× more entries in the same RAM budget), replaced LinkedHashMap with intrusive doubly-linked LRU entries, right-sized W-TinyLFU sketch tables with single-hash updates, reduced sync L1 hit nanoTime() calls to 1 (+22% 8-thread L1 throughput), and added O(log N) binary-search prefix routing plus cached legacy Base64 namespaces in RedisTrackingCoordinator.
  • Direct Indexed JDBC ResultSet Hydration (cachedb-core, cachedb-processor, cachedb-storage-jdbc, cachedb-starter): Generated direct ordinal-indexed fromResultSet(ResultSet, int[]) codecs for unencrypted entities, eliminated Oracle/H2 uppercase O(C²) column scans with O(1) RowSchema/IndexedRowMap fallback (+56% faster row hydration with -76% heap allocation per row), enabled PostgreSQL cursor streaming, and hoisted ResultSetMetaData reads in MigrationWarmRunner.
  • Multi-Provider SQL Write-Behind & Tenant Guard Batching (cachedb-storage-jdbc, cachedb-storage-postgres, cachedb-storage-mssql, cachedb-storage-oracle): Cached verified catalog/schema per physical JDBC connection in JdbcWriteFence (-1 getSchema() RTT/flush), added constant-SQL PostgreSQL UNNEST claims/upserts/deletes, 1-RTT SQL Server OPENJSON claims & combined LOCK_TIMEOUT swap + maxProbeRows fix, Oracle JSON_TABLE seeding & O(log N) ORA-00001 binary-split recovery, and single-query batched multi-tenant JdbcTenantPurgeGuard.authorizeWrites (16 → 1 SQL query, -94% SQL RTTs).
  • Redis Write/Delete, Residual Preload & Streaming EVALSHA (cachedb-storage-redis): Reused residual filter MGET payloads during entity materialization (-50% MGET & decode), skipped non-score ZREM and replaced DEL + full HSET with diff-only HSET/HDEL (-33% index update commands), trimmed redundant Lua commands in cachedb-upsert-body.lua and cachedb-delete-body.lua, and upgraded standalone snapshot EVAL phases to zero-copy streaming EVALSHA.
  • Lock-Free Spring Cache & Low-Allocation Micrometer (cachedb-spring-boot-starter): Added lock-free ConcurrentHashMap L1 lookups with cached immutable scalars in CacheDbCache, and removed per-operation HashMap allocation & dynamic tag lookups in MicrometerCacheObservationRecorder (+7.5% higher throughput with -17% heap allocation).
  • Spring Data, Reactor & Read Coalescer (cachedb-spring-data, cachedb-reactor, cachedb-storage-redis, cachedb-core): Skipped redundant count() round-trips on partial first pages and non-empty final pages in AbstractCacheDbSpringDataRepository (-50% Redis calls), replaced flatMap(Mono::justOrEmpty) with .handle(...) in ReactiveEntityRepository, skipped redundant post-I/O lock acquisitions in RedisReadCoalescer, and added EMPTY/ADMIN singletons in CacheTenantContext.
  • Binary Snapshot Spool, cachedb-json & Lock-Free Sequences (cachedb-spring-boot-starter, cachedb-json, cachedb-storage-jdbc): Switched SnapshotSpool compression from Base64 text to raw binary DEFLATE (-25% disk size, 2× faster, -83% heap allocation), added single-pass string validation + UnsynchronizedStringReader in cachedb-json, and replaced mutex locking with lock-free CAS SequenceBlock allocation in JdbcPooledSequenceIdGenerator.

Packages

All public Maven artifacts use 0.19.4. The complete distribution contains 63 JARs (binary, sources, and Javadoc), 23 POMs, per-file SHA-256 checksums, SHA256SUMS, and cache-database-0.19.4-github-release.zip: 175 release assets in total.

Anonymous Maven repository: https://esasmer-dou.github.io/cache-database/maven2

The packaged runtime and distribution were built and tagged at commit 3c0fe6663d301b147b775ca315ede6d45244d100.

Upgrade & Compatibility

  • Java 21+ is required. Align cachedb-bom, cachedb-processor, your SQL provider starter, and optional modules at 0.19.4, then recompile generated bindings.
  • Zero-downtime Redis Functions upgrade: RedisFunctionsConfig advances libraryVersion to "0.19.4" on cachedb_v019; startup automatically performs lease-coordinated FUNCTION LOAD REPLACE without FUNCTION FLUSH.
  • Read coalescing remains disabled by default; enable it only after workload-specific measurement.
  • This numbered framework package is not universal Production GA, customer route certification, or managed Redis/SQL HA topology certification.

Upgrade Guide | Detailed Release Notes

Türkçe

Java 21 ve üzeri için 0.19.x hattında kapsamlı performans, bellek (heap) ve ağ gidiş-dönüş (RTT) optimizasyonu sürümüdür. Sıfır çalışma zamanı reflection kuralını, tam Public API uyumluluğunu ve mevcut Redis verileriyle geriye dönük uyumluluğu korur.

  • Sorgu ve Redis İndeksleme: İstek kapsamlı IndexQueryScope ile sorgu planlama RTT sayısı -%81 (37 → 7), artık filtre ön-yüklemesi ile çift okuma -%50, fark bazlı indeks güncelleme ile yazma komutları -%33 azaltıldı; histogram ve sınırlı aralık okumaları tek RTT EVALSHA Lua betiklerine taşındı.
  • Kilit ve Bellek Verimliliği: Kilitsiz Copy-On-Write DefaultEntityRegistry (31,6× hız, -%91 heap), sıfır-CAS BinaryPayloadCodec (+%18–21 hız, -%27 ila -%38 heap), putDecoded L1 yakın önbellek (3× daha fazla kayıt, +%22 hız), ikili SnapshotSpool (2× hız, -%83 heap, -%25 disk) ve düşük tahsisli Micrometer gözlemlenebilirliği (+%7,5 hız, -%17 heap) eklendi.
  • JDBC, SQL Sağlayıcıları ve Veri Akışı: Derleme zamanında üretilen doğrudan indeksli fromResultSet (+%56 daha hızlı satır okuma, -%76 heap), tek sorguda toplu çoklu kiracı guard (16 → 1 SQL, -%94 RTT), PostgreSQL UNNEST, SQL Server OPENJSON + tek RTT LOCK_TIMEOUT değişimi, Oracle JSON_TABLE + ORA-00001 ikili bölme kurtarması, kısmi sayfalarda gereksiz count() atlama (-%50 Redis çağrısı) ve ProjectionSchema null-alan düzeltmesi sağlandı.

63 JAR, 23 POM, dosya bazlı SHA-256 sağlama toplamları, SHA256SUMS ve dağıtım ZIP arşivi dahil toplam 175 varlık eksiksiz yayımlanır. PostgreSQL, SQL Server ve Oracle örnek projeleri 0.19.4 sürümünde eşitlenmiştir.

Türkçe Geçiş Rehberi | Türkçe Sürüm Notları