Redis 8.12

What's new in Redis 8.12

Release notes:

8.12-rc1 | 8.12-rc2 | 8.12-rc3 | 8.12.0

Redis 8.12 introduces new features and performance improvements, building on the foundation of Redis 8.10.

This release delivers improvements across multiple areas:

  • Compressed bitmaps: Roaring bitmap integration that reduces memory usage and speeds up bitmap operations, plus the BITRANGEINTARRAY command
  • SEXPIRE, SPEXPIRE, SEXPIREAT, SPEXPIREAT, STTL, SPTTL, SEXPIRETIME, SPEXPIRETIME: set and get expiration on individual set members
  • ZMOVE, BZMOVE, ZMOVEMEMBER: atomically move members between sorted sets
  • BLESS: protect specified keys from eviction
  • CLUSTER MIGRATION STATUS: progress reporting for the snapshot and incremental migration phases
  • SLOWLOG GET: reports the CPU time of each slow command
  • tls-groups: configure Transport Layer Security (TLS) named groups
  • Count-min sketch: optional CELL_SIZE for lower memory usage, and negative increments in CMS.INCRBY
  • Automatic creation of deep paths in JSON
  • 8-bit scalar quantization (SQ8) compression for hierarchical navigable small world (HNSW) vector fields
  • COLLECT LIMIT honors search-max-aggregate-results
  • Performance and resource utilization improvements across core, Search, JSON, and Probabilistic
  • Numerous bug fixes across core, Search, JSON, and Probabilistic
  • Behavior changes in Search and Probabilistic
  • New Modules API flag and function, and JSON shared API functions

Below is a detailed breakdown of these updates.

Supported operating systems

Redis 8.12 is tested on:

  • Ubuntu 22.04 (Jammy Jellyfish), 24.04 (Noble Numbat), 26.04 (Resolute Raccoon)
  • Rocky Linux 8.10, 9.7, 10.1
  • AlmaLinux 8.10, 9.7, 10.1
  • Debian 12.13 (Bookworm), Debian 13.4 (Trixie)
  • Alpine 3.23
  • macOS 14.8.4 (Sonoma), 15.7.4 (Sequoia), 26.3 (Tahoe) - for both Intel and ARM

Security fixes

  • A TLS session could be resumed on another listener (client port or cluster bus), or after tls-auth-clients or tls-expected-peer-name changed, without the checks of the new settings (#16127).
  • Indexed value hashing in Search is collision-resistant, preventing index degradation from hash-based denial-of-service (HashDoS) attacks (#Q10073, MOD-14459).
  • unicode_tolower no longer reads out of bounds on a dangling multi-byte lead byte in indexed TEXT fields encoded with the 8-bit Unicode Transformation Format (UTF-8) (#Q11202, MOD-18088).

New features

Compressed bitmaps

Redis 8.12 integrates redis-roaring (#15331), which reduces memory usage and speeds up bitmap operations. Thanks to Antonio, its creator, for contributing this capability. Roaring bitmap creation is disabled by default; see Roaring-compressed bitmaps to enable it with the bitmap-default-roaring configuration parameter.

The new BITRANGEINTARRAY command (#15986) returns the offsets of set bits within a range. It's equivalent to redis-roaring's R.RANGEINTARRAY.

Set member expiration

You can now set an expiration on individual set members (#15938). See Member expiration.

Sorted set moves

The new ZMOVE, BZMOVE, and ZMOVEMEMBER commands (#16135) atomically move members between sorted sets: from either end, by score range, or by name. They support COUNT batching and NX/XX destination conditions.

Eviction protection

The new BLESS command (#15828) protects specified keys from eviction. Use BLESS SET and BLESS CLEAR to add and remove protection, BLESS GET to check a key's status, and BLESS SCAN to list protected keys. See Protecting keys from eviction.

Cluster migration progress

CLUSTER MIGRATION STATUS reports progress for both the snapshot and incremental migration phases (#15829).

SLOWLOG GET CPU time

SLOWLOG GET reports the CPU time of each slow command in a new eighth field (#15907). Use it to tell commands that ran slowly apart from commands that were starved of CPU. The new off-cpu-tracking configuration parameter controls this tracking.

TLS named groups

The new tls-groups configuration directive (#15556) configures the TLS named groups. See TLS.

Count-min sketch cell size

Count-min sketches support an optional CELL_SIZE argument in CMS.INITBYDIM and CMS.INITBYPROB for lower memory usage (#P1063). CMS.INCRBY accepts negative increments to decrement counts, and CMS.INFO reports cell sizes.

JSON deep path auto-creation

JSON can automatically create deep paths (#J1640). When the json-auto-create-deep-paths configuration parameter is enabled, JSON.SET creates missing parent objects.

SQ8 vector compression

8-bit scalar quantization (SQ8) compression is available for HNSW vector fields (#Q11330, MOD-14958). See HNSW vector compression.

COLLECT LIMIT

COLLECT LIMIT in FT.AGGREGATE honors the configurable search-max-aggregate-results (#Q10063).

Bug fixes

Redis 8.12 includes a broad set of bug fixes (compared to 8.10.0).

Core fixes

  • Changes made by XDELEX DELREF for already-deleted stream entries could fail to propagate to replicas or the append-only file (AOF) (#15569).
  • Operations using random radix-tree traversal could behave incorrectly when starting from certain leaf nodes (#15508).
  • Memory usage could be calculated incorrectly for hashes using shared templates (#15604).
  • Redis database (RDB) files could fail to load after XSETID reduced a stream's entries_added counter (#15489).
  • SET could calculate an incorrect expiration time when given an excessively large relative TTL (#15626).
  • Active defragmentation could incorrectly handle the shared-template registry used by compact hashes (#15628).
  • After failover, a replica could remain connected to another replica instead of the new primary (#15530).
  • Invalid cluster slot ranges could be accepted after being merged into a valid range (#15733).
  • RESTORE could calculate an incorrect expiration time when given an excessively large relative TTL (#15756).
  • Memory growth could be accounted for incorrectly when SETBIT or BITFIELD expanded a string (#15699).
  • XTRIM could leave a stream in a state that prevented an RDB file containing it from loading (#15815).
  • Clients could fail to receive a protocol error when a malformed command arrived across multiple network reads (#15795).
  • ARLASTITEMS could omit elements appearing after a gap in an array (#15875).
  • Data could be lost when a legacy AOF file was upgraded before loading completed (#15916).
  • Hiredis clients on Linux could mishandle errors when establishing Transmission Control Protocol (TCP) connections (#15917).
  • Redis could crash when a module thread paused input/output (I/O) threads (#15869).
  • Publish/subscribe (Pub/Sub) subscriptions could remain active after the subscribing user's channel permissions were revoked or the user was deleted, if the client had re-authenticated as another user (#15468).
  • Module actions scheduled by hash-field expiration notifications could be delayed after fields expired in the background (#15623).
  • Data could be lost after a replica migrated to a different shard (#15680).
  • LMOVEM could emit keyspace notifications inconsistent with those produced by LMOVE (#15587).
  • Command side effects could be propagated to replicas or the AOF despite settings that should have excluded them (#15695).
  • A replica that fell behind by more than its output buffer soft limit was disconnected even when repl-backlog-size was larger (#16098).
  • Keys could be lost during atomic slot migration when the destination rejected a command, for example with -NOREPLICAS due to min-replicas-to-write (#16176).
  • Set members could be expired incorrectly on the destination during atomic slot migration (#16210).
  • MSETEX with repeated EX or PX options was propagated to replicas and the AOF as an invalid command, losing the keys (#16096).
  • Commands could be replayed twice on AOF load when an AOF rewrite started after an AOF write error, such as a full disk (#16175).
  • XADD entries with IDMP could be lost on AOF replay or on a lagging replica, and XIDMPRECORD could crash a lagging replica (#15955).
  • Consumers created by XCLAIM or XAUTOCLAIM that claimed no entries were not propagated to replicas or the AOF (#15930).
  • Some key updates could apply the value or TTL to a different key while the keyspace was being resized (#16121).
  • Redis could crash with io-threads > 1 when running module commands that use getkeys-api or getchannels-api (#16042).
  • Redis could crash when a module read a sorted set emptied by ZPOPMIN/ZPOPMAX from its keyspace notification (#16165).
  • ZRANGESTORE with the same source and destination key could cause a use-after-free when key-memory-histograms or cluster-slot-stats-enabled is enabled (#16125).
  • ZRANGESTORE could create a sorted set with a broken score order when the source was a listpack loaded from an unordered payload (#16167).
  • A sorted set restored without sanitize-dump-payload could store a duplicate member twice after its conversion to the B+tree encoding (#16164).
  • A malformed RESTORE payload or RDB file could corrupt memory, only with modules that register key metadata classes (#16146).
  • CONFIG GET and CONFIG REWRITE dropped the n, o, and c flags of notify-keyspace-events when A was set, so these events stopped after a restart (#16142).
  • DELEX honored lazyfree-lazy-server-del instead of lazyfree-lazy-user-del (#16120).
  • Lua scripts with very deep string patterns could exhaust the stack; such patterns now fail with pattern too complex (#16203).
  • Redis could crash when using preload-file with AOF and a working directory of 1024 bytes or longer (#16233).
  • On FreeBSD, the bundled jemalloc took over libc's malloc hooks, which could crash multi-threaded tools such as redis-benchmark --threads and deadlock after fork() (#16062).

Redis Search fixes

  • The shard no longer crashes with a segmentation fault (SIGSEGV) when RESTORE of a legacy ft_index0 payload is issued outside an RDB load (#Q10872, MOD-15685).
  • Arming the garbage collection (GC) timer off the main thread on ARM no longer causes random shard crashes after extended uptime (#Q10728, MOD-17309).
  • The server no longer crashes on writes when an index FILTER references no schema fields (#Q10767, MOD-15592).
  • FT.ALTER SCHEMA ADD running concurrently with queries under WORKERS>0 no longer crashes query execution across VECTOR, TAG, NUMERIC, GEO, ISMISSING, and GEOSHAPE nodes (#Q11303, #Q11304, #Q11308, #Q11309, #Q11310, #Q11311; MOD-18356, MOD-18361, MOD-18366, MOD-18367, MOD-18368).
  • FT.AGGREGATE with the numeric SORTBY optimizer no longer crashes or returns wrong results (#Q11474, MOD-6967).
  • The coordinator no longer crashes with Redis serialization protocol version 2 (RESP2) when FT.PROFILE HYBRID hits a return-strict timeout (#Q10209, MOD-16396).
  • TEXT PHONETIC matches now behave correctly when non-TEXT fields precede TEXT fields in the schema (#Q10145, MOD-16304).
  • An FT.AGGREGATE cursor with FILTER reports the correct result count (#Q11262, MOD-18172).
  • FT.EXPLAIN now renders a multi-word tag value as a single tag rather than an INTERSECT (#Q11282, MOD-8666).
  • NOT queries no longer leak excluded documents or drop results after a concurrent index change (#Q10768, MOD-17394).
  • Numeric index cardinality and bounds are now correct under float compression (#Q10637, MOD-16877).
  • Empty wildcard patterns no longer cause out-of-bounds writes or spurious empty-value matches (#Q10704, MOD-17451).
  • Wildcard ? on WITHSUFFIXTRIE TEXT fields now matches per codepoint rather than per byte (#Q10752, MOD-17476).
  • Suffix-trie wildcard queries on TEXT fields are now case-insensitive (#Q10112, MOD-16259).
  • Wildcard_MatchRune no longer hangs on a literal * in the indexed string (#Q11450).
  • Duplicate vector results are no longer returned during tiered indexing (#Q11267, MOD-17795).
  • FT.SEARCH on a cluster returns an error for invalid LIMIT arguments, matching standalone behavior (#Q10731, MOD-12465).
  • FT.SEARCH under WORKERS>0 no longer returns a nil field-array for documents re-indexed mid-query (#Q10251, MOD-16507).
  • Sort keys with embedded NUL bytes are no longer truncated in replies (#Q10921).
  • The RETURN_STRICT safe-loader no longer deadlocks the Redis global lock (GIL) on client timeout (#Q10085, MOD-16267).
  • An index reference leak after queued search cancellation no longer occurs (#Q11449, MOD-18682).
  • Memory leaks after coordinator SEARCH cancellation no longer occur (#Q11369, MOD-18548).
  • SST replication no longer hangs and the numeric snapshot is no longer corrupted when disk GC is mid-cycle (#Q10881, MOD-17197).
  • FT.HYBRID cursor setup now has a bounded channel timeout (#Q10110, MOD-16145).
  • RETURN_STRICT cursors are depleted on timeout; strict-timed-out hybrid cursor cycles drop their cursors at cycle end (#Q10211, #Q10745; MOD-16091, MOD-16991).
  • Coordinator cursor memory is now capped via INDEX_CURSOR_LIMIT (#Q10947, MOD-17479).
  • Cursor reads no longer time out against an earlier read's deadline and correctly report a timeout that expires while iterators are revalidated (#Q10766, #Q10763; MOD-17489, MOD-17488).
  • RDB and replication payloads no longer leak a stray heap byte (#Q10993, MOD-17800).
  • FT.HYBRID returns a stable reciprocal rank fusion (RRF) result order across cluster shards (#Q10074, MOD-12438).
  • Cluster TLS connections now use Redis node metadata, aligning with topology changes (#Q11027, MOD-15869).
  • Cluster topology is now refreshed on topology-change events rather than by polling (#Q10380, #Q10430; MOD-15868, MOD-15870).
  • Coordinator fanout now preserves binary argument lengths (#Q10835).
  • Replica stalls during FT.DROPINDEX DD are reduced (#Q11095).
  • Internal query arguments missing during a rolling upgrade are tolerated (#Q10083, MOD-16047).
  • Forced GC now waits for a concurrent child process instead of skipping its cycle (#Q10816).
  • The asynchronous disk read pool no longer spins when saturated; it blocks instead (#Q10958).
  • The VectorSimilarity dependency addresses unaligned metadata access on ARM/Scalable Vector Extension (SVE) paths (#Q10646, MOD-15303).
  • FT.PROFILE ON_TIMEOUT FAIL now reports a pre-execution timeout as a warning rather than an error (#Q10352, MOD-16660).
  • Crash reports now include in-flight coordinator aggregate, hybrid, and cursor-read queries (#Q10870, MOD-16992).
  • Debug aggregate request synchronization no longer crashes (#Q11089, MOD-17616).

JSON fixes

  • Array-index normalization overflow for extreme negative indexes, including i64::MIN, affecting commands such as JSON.ARRTRIM (#J1636).
  • JSON.MGET key-spec metadata now identifies all key arguments and excludes the trailing JSONPath argument (#J1648).
  • Downstream compilation when using redis_json_module_create! with the as-library feature and the new RDB depth configuration (#J1670).

Probabilistic fixes

  • TDIGEST.QUANTILE, TDIGEST.CDF, and TDIGEST.TRIMMED_MEAN could return a not-a-number (NaN) value for a sketch with exactly one observation (#P1035).
  • RDB loading and RESTORE inconsistently rejected invalid numeric values, allocation sizes, serialized counts, or inconsistent metadata in Bloom filters, count-min sketches, Top-K sketches, and t-digests. Bloom filter growth lacked overflow checks (#P1053).
  • Bloom filters with excessive hash-function counts could be accepted during loading and restoration, including through BF.LOADCHUNK (#P1067).
  • Top-K sketches containing nonempty items with zero counts or empty-string items with nonzero counts could be restored incorrectly (#P1053).
  • CMS.MERGE key metadata did not correctly identify the destination and all source keys, affecting cluster slot validation (#P1062).
  • CF.COMPACT command metadata was missing its argument count and key specification (#P1071).

Performance and resource utilization improvements

Redis 8.12 delivers a broad set of performance improvements (compared to 8.10.0).

Core improvements

  • Batch updates to hashes using shared templates run more efficiently (#15618).
  • Supported x86 systems use the processor-based monotonic clock by default, with runtime calibration to reduce timing overhead (#15018).
  • RDB and AOF loading provides sequential-read hints to the operating system to improve loading efficiency (#15782).
  • SORT and SORT_RO no longer convert listpack-encoded sorted sets to B+tree, which increased their memory usage, including on read-only replicas (#15622).
  • ZADD that converts a sorted set to B+tree no longer leaves an oversized member index, which wasted memory and slowed ZSCAN (#16163).
  • Client memory (tot-mem, mem_clients_normal, maxmemory-clients) now includes the names of watched keys and of Pub/Sub channels and patterns (#16069).
  • Faster ZRANGESTORE for large REV rank ranges (#16126).
  • Faster ZRANDMEMBER with a large positive count on B+tree sorted sets (#16156).
  • Faster SRANDMEMBER with a positive count on hashtable-encoded sets (#15420).
  • Faster HEXPIRE and HSETEX updates of field expiration on listpack-encoded hashes (#15901).

Redis Search improvements

  • Searches on indexes using field-level expiration (HEXPIRE) are faster (#Q10169, MOD-16350).
  • Coordinator field lookup and row-reply serialization overhead is reduced (#Q10981, #Q11065; MOD-17924).
  • Cluster reply conversion, result destruction, and GROUPBY cleanup have reduced overhead (#Q11055, #Q11056, #Q11057; MOD-17908, MOD-17909, MOD-17910).
  • Query replies now format integral numeric values without snprintf and declare reply collection lengths up front (#Q11507, #Q11506; MOD-18800, MOD-18799).
  • Hash field loading for RETURN and LOAD no longer requires per-field allocations (#Q11509, MOD-18811).
  • FT.ALTER avoids unnecessary document reindexing during schema additions (#Q11278, MOD-18171).
  • Score/payload-only hash updates avoid reindexing (#Q11384, MOD-18182).
  • Hash documents are no longer re-indexed when no indexed field is touched (#Q11230, MOD-17688).
  • Coordinator requests are now allocated on the main thread, removing CoordRequestCtx (#Q10515, MOD-16990).
  • Query usage is now separated from administrative index operations (#Q11018, MOD-17536).

JSON improvements

  • Memory usage reporting divides a shared string's allocation, including header and padding, proportionally among its references. Previously, each reference was charged the full allocation (#J1645).
  • JSON parsing uses compact object allocation to reduce memory usage (#J1660).
  • JSONPath parsing and evaluation reduce backtracking, temporary allocations, and repeated traversal. Optimizations cache root-path operands across filter candidates, stop existence checks at the first match, and reduce regex matching and string comparison overhead (#J1661).
  • Typed-array element access uses direct indexing, avoiding repeated iteration and quadratic work during full indexed scans (#J1631).

Probabilistic improvements

  • t-digest compression performs better for inputs containing many duplicate values. Sorting is bounded to O(n log n), avoiding quadratic behavior on pathological inputs (#P1049).

Behavior changes

  • FT.CREATE rejects RERANK on HNSW vector fields in random access memory (RAM) mode (#Q10109, MOD-16015).
  • Disk indexes reject DIALECT 4 and WITHOUTCOUNT (#Q10200, MOD-15997).
  • COLLECT requires an @ prefix for field names (#Q10082, MOD-16233).
  • JSON HIGHLIGHT/SUMMARIZE fields with multi-value JSONPath are now rejected (#Q11106, MOD-16530).
  • Non-cacheable commands are now marked with dont_cache (#Q10208, MOD-16175).
  • Numeric command arguments are now strictly parsed (#Q10699, MOD-17409).
  • The Search module requires Redis 8.9.241 or newer to load (#Q11335, MOD-15868).

Probabilistic

  • Rejected CMS.INCRBY item updates now leave counters and the total count unchanged instead of saturating counters on overflow. Multi-item commands can still partially succeed (#P1063).
  • CMS.MERGE now requires matching cell sizes across the destination and all sources (#P1063).

Modules API

  • REDISMODULE_NODE_PORT_TLS: a new RM_GetClusterNodeInfo() flag to retrieve a cluster node's TLS port (#15517).
  • RedisModule_GetUsedMemoryRatioEstimate: like RedisModule_GetUsedMemoryRatio, but can be called from module threads without holding the GIL (#16105).
  • getWithPath in JSON shared API V9: evaluates a precompiled JSONPath, so callers can compile a path once and reuse it across documents (#J1623).
  • pathParseNoErrorMsg in JSON shared API V10: compiles JSONPaths without a Redis context or an allocated error message. Returns a compiled handle on success or NULL on failure (#J1666).
  • JSON pre-command hooks are optional, and hook errors can abort JSON commands before execution. Hooks now return RedisResult<()>; shared C API calls continue to ignore hook errors (#J1653).
  • The Rust Manager interface adds clone_value and create_object to support construction of missing paths. Custom implementations must implement these methods and satisfy the new Borrow<Self::V> requirement for owned values (#J1640).

Configuration parameters

  • bitmap-default-roaring: enables the new Roaring bitmaps type; disabled by default (#15331).
  • stream-stats: enables the per-database stream histograms in INFO STREAMS; disabled by default (#15682).
  • off-cpu-tracking: controls the CPU time tracking reported by SLOWLOG GET (#15907).
  • json-legacy-rdb-depth-limit: enforces a maximum nesting depth of 128 when loading JSON from RDB or through RESTORE; disabled by default (#J1657).
  • json-auto-create-deep-paths: disabled by default and configurable only at load time. Use the same value across shard nodes and AOF replays to prevent data divergence (#J1640).

Metrics

  • INFO keysizes histograms include stream key sizes (#15374).
  • INFO STREAMS provides per-database histograms of consumer groups per stream, pending entries per group, and consumers per group. Enable with stream-stats yes (#15682).
  • FT.INFO exposes the default EF_RUNTIME (#Q10097, MOD-16147).
  • Disk GC bytes_collected and cycle statistics are reported in FT.INFO (#Q10107, MOD-14621).
  • FT.INFO on the coordinator aggregates per-field disk metrics via the reducer (#Q10464, MOD-14859).
  • Redis INFO breaks down query timeout metrics by pipeline stage (#Q10204, MOD-13192).
  • Index metrics are no longer collected for unrelated INFO sections (#Q11521, MOD-18033).
  • FT.PROFILE loader-field timing resolution is improved (#Q10536, MOD-17132).

CLI tools

  • redis-cli could generate excessive help entries from a COMMAND reply with extreme arity values (#16117).
  • redis-cli --keystats printed empty statistics when no keys were found (#15823).
RATE THIS PAGE
Back to top ↑