Repository navigation
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 inRedisWriteBehindWorker, pipelined standalone and ClusterXACK + XDELacknowledgements (including batched deferred ack drains), and upgraded ClusterRedisDurabilityTracker.advanceBatchtoEVALSHAwith automaticNOSCRIPT/ACL fallback. - Indexed Query Planning RTT Reduction (
cachedb-storage-redis): Added request-scopedIndexQueryScopememoization inRedisQueryIndexManager(37 → 7 planning RTTs, -81% in combined single-filter andANDquery benchmarks), single-checkfullyIndexedAST traversal, precomputed child cardinalities, single-RTTEVALSHALua scripts for histograms (51 → 1 RTT) and boundedSMEMBERS/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-lockedDefaultEntityRegistrysnapshots with a lock-free Copy-On-WriteRegistrySnapshotand O(1)findByType(31.6× higher throughput under 8-thread contention with -91% heap allocation), added typed primitive JDBC binding (ColumnKind), precompiled identifier regexes, cachedCacheTransactionTemplate/CacheDatabase, and enabled binary projection wire encoding inRedisAtomicWriteBatch. - Projection Null-Field Fix & Hydration N+1 Elimination (
cachedb-core,cachedb-storage-redis): Fixed a latentProjectionSchemaBINARY_V2decoding bug where null projection fields could triggerIllegalArgumentException, batched sync/async projection warmup viaupsertBatch, wired direct column access and prebuilt comparators intoRedisProjectionRepository, batched warm hydration access/reindex calls, and upgradedRedisVersionedHydrator.upsertBatchtoEVALSHA. - Zero-CAS Binary Codec & Schema Envelope (
cachedb-core): Replaced CAS scratch pooling inBinaryPayloadCodecwith platform-threadThreadLocalscratch buffers, single-pass C2-inlined ASCII string encoding, zero-allocationOffsetDateTimeencoding, 64-bitlowPresenceMask, cachedEnumconstant arrays, and binaryVERSION_3_ENVELOPEframing 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 viaputDecoded(3× more entries in the same RAM budget), replacedLinkedHashMapwith intrusive doubly-linked LRU entries, right-sized W-TinyLFU sketch tables with single-hash updates, reduced sync L1 hitnanoTime()calls to 1 (+22% 8-thread L1 throughput), and added O(log N) binary-search prefix routing plus cached legacy Base64 namespaces inRedisTrackingCoordinator. - Direct Indexed JDBC
ResultSetHydration (cachedb-core,cachedb-processor,cachedb-storage-jdbc,cachedb-starter): Generated direct ordinal-indexedfromResultSet(ResultSet, int[])codecs for unencrypted entities, eliminated Oracle/H2 uppercase O(C²) column scans with O(1)RowSchema/IndexedRowMapfallback (+56% faster row hydration with -76% heap allocation per row), enabled PostgreSQL cursor streaming, and hoistedResultSetMetaDatareads inMigrationWarmRunner. - 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 inJdbcWriteFence(-1getSchema()RTT/flush), added constant-SQL PostgreSQLUNNESTclaims/upserts/deletes, 1-RTT SQL ServerOPENJSONclaims & combinedLOCK_TIMEOUTswap +maxProbeRowsfix, OracleJSON_TABLEseeding & O(log N)ORA-00001binary-split recovery, and single-query batched multi-tenantJdbcTenantPurgeGuard.authorizeWrites(16 → 1 SQL query, -94% SQL RTTs). - Redis Write/Delete, Residual Preload & Streaming
EVALSHA(cachedb-storage-redis): Reused residual filterMGETpayloads during entity materialization (-50% MGET & decode), skipped non-scoreZREMand replacedDEL + full HSETwith diff-onlyHSET/HDEL(-33% index update commands), trimmed redundant Lua commands incachedb-upsert-body.luaandcachedb-delete-body.lua, and upgraded standalone snapshotEVALphases to zero-copy streamingEVALSHA. - Lock-Free Spring Cache & Low-Allocation Micrometer (
cachedb-spring-boot-starter): Added lock-freeConcurrentHashMapL1 lookups with cached immutable scalars inCacheDbCache, and removed per-operationHashMapallocation & dynamic tag lookups inMicrometerCacheObservationRecorder(+7.5% higher throughput with -17% heap allocation). - Spring Data, Reactor & Read Coalescer (
cachedb-spring-data,cachedb-reactor,cachedb-storage-redis,cachedb-core): Skipped redundantcount()round-trips on partial first pages and non-empty final pages inAbstractCacheDbSpringDataRepository(-50% Redis calls), replacedflatMap(Mono::justOrEmpty)with.handle(...)inReactiveEntityRepository, skipped redundant post-I/O lock acquisitions inRedisReadCoalescer, and addedEMPTY/ADMINsingletons inCacheTenantContext. - Binary Snapshot Spool,
cachedb-json& Lock-Free Sequences (cachedb-spring-boot-starter,cachedb-json,cachedb-storage-jdbc): SwitchedSnapshotSpoolcompression from Base64 text to raw binary DEFLATE (-25% disk size, 2× faster, -83% heap allocation), added single-pass string validation +UnsynchronizedStringReaderincachedb-json, and replaced mutex locking with lock-free CASSequenceBlockallocation inJdbcPooledSequenceIdGenerator.
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 at0.19.4, then recompile generated bindings. - Zero-downtime Redis Functions upgrade:
RedisFunctionsConfigadvanceslibraryVersionto"0.19.4"oncachedb_v019; startup automatically performs lease-coordinatedFUNCTION LOAD REPLACEwithoutFUNCTION 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ı
IndexQueryScopeile 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 RTTEVALSHALua betiklerine taşındı. - Kilit ve Bellek Verimliliği: Kilitsiz Copy-On-Write
DefaultEntityRegistry(31,6× hız, -%91 heap), sıfır-CASBinaryPayloadCodec(+%18–21 hız, -%27 ila -%38 heap),putDecodedL1 yakın önbellek (3× daha fazla kayıt, +%22 hız), ikiliSnapshotSpool(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), PostgreSQLUNNEST, SQL ServerOPENJSON+ tek RTTLOCK_TIMEOUTdeğişimi, OracleJSON_TABLE+ORA-00001ikili bölme kurtarması, kısmi sayfalarda gereksizcount()atlama (-%50 Redis çağrısı) veProjectionSchemanull-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.