Skip to content

Support Redis Array data type (Redis 8.8) #3749

Closed

Description

@a-TODO-rov

Summary

Add client-side support for the new Array data type introduced in Redis 8.8.

Arrays are sparse, indexed collections that support efficient element access, range operations, pattern matching, and aggregation. Unlike Redis Lists (which are dense, sequential structures), Arrays allow setting values at arbitrary indices and leave gaps (empty slots) between populated entries.

Server reference: redis/redis#15162

Commands

The following 18 commands are covered:

Command Description
ARSET Set a value at a given index
ARMSET Set multiple index-value pairs
ARGET Get the value at a given index
ARMGET Get values at multiple indices
ARDEL Delete element(s) at given indices
ARDELRANGE Delete elements in index range(s)
ARLEN Get the logical length (max index + 1)
ARCOUNT Get the count of populated slots
ARGETRANGE Get all values in a range (nulls for empty slots)
ARSCAN Scan populated entries, returning index/value pairs
ARGREP Search elements by predicate (EXACT, MATCH, GLOB, RE)
AROP Aggregate/count operations over a range (SUM, MIN, MAX, USED, MATCH)
ARINSERT Insert values at the next available index
ARRING Insert values in ring-buffer fashion
ARNEXT Get the next insert index
ARSEEK Set the insert cursor to a specific index
ARLASTITEMS Get the last N items in insertion or reverse order
ARINFO Get metadata about the array

API

Sync / Async / Reactive / Coroutines

All commands are available across all four API flavors:

  • Sync: RedisArrayCommands<K, V>
  • Async: RedisArrayAsyncCommands<K, V> (returns RedisFuture<T>)
  • Reactive: RedisArrayReactiveCommands<K, V> (returns Mono<T> / Flux<T>)
  • Coroutines: RedisArrayCoroutinesCommands<K, V> (suspend functions)

Cluster support

All commands are supported over cluster connections via RedisAdvancedClusterCommands and the NodeSelection API.

Testing

  • Unit tests for RESP wire format of all 18 commands
  • Integration tests covering all commands across Sync, RESP2, Reactive, Cluster, and Transaction modes

Activity

  1. linked a pull request that will close this issueAdd arrays API #3745on May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions