Skip to content
Search ffkv docs

Search the complete handbook, locally.

    LRANGE

    Returns a range of elements from a list.

    Browse all commands · Upstream source documentation

    Reference fieldValue
    Canonical nameLRANGE
    Catalog groupList commands
    Upstream since1.0.0 — upstream Redis/module version, not an ffkv release
    Pinned catalogRedis 8.10.0
    LRANGE key start stop

    A successful pop removes the item immediately: Redis list queues have no acknowledgement or automatic redelivery. Blocking calls do not wait in EXEC or Lua. Only large list/native-job bodies are SSD-offloaded in hybrid mode.

    Source: README.md:155–174, 810–825; tests/bdd/features/lists.feature.

    All requests share the 8 MiB framing/1,024-argument ingress limit; normal RESP replies have 64 MiB wire/logical budgets with bounded nesting/value counts. Management and Lua origins impose smaller budgets. These are not a process RSS cap. Catalog inclusion is not exhaustive option or wire-format parity. See limits and compatibility.

    The following fields come from the pinned Redis metadata, not measured ffkv performance or an assertion that ffkv enforces every upstream flag. Running COMMAND INFO/COMMAND DOCS describe the current engine.

    Upstream Redis complexity: O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range.

    Upstream arity: 4 (includes the command name; a negative number is a minimum).

    Command flags: READONLY.

    ACL categories: LIST.

    ArgumentTypeConstraints / metadata
    keykeykey_spec_index: 0
    startintegerRequired
    stopintegerRequired

    Upstream key discovery descriptors (indexes are relative to the full command vector):

    [
    {
    "flags": [
    "RO",
    "ACCESS"
    ],
    "begin_search": {
    "index": {
    "pos": 1
    }
    },
    "find_keys": {
    "range": {
    "lastkey": 0,
    "step": 1,
    "limit": 0
    }
    }
    }
    ]
    Additional pinned upstream metadata
    {
    "group": "list",
    "since": "1.0.0"
    }

    Metadata source · Local snapshot: src/command_metadata.json, key lrange.

    These are source observations, not a test run performed by this documentation build. A tag identifies scenario intent; an extracted vector identifies a command invocation, which may intentionally produce an error. Scenarios may require setup, multiple connections, persistence, cluster nodes or native-module fixtures.

    • Swapping logical databases preserves values TTLs and recovery — tests/bdd/features/catalog.feature:170; invocation observed.
    • Atomic import transfers real typed data and survives destination restart — tests/bdd/features/cluster.feature:498; invocation observed.
    • Live resolved mutations replay list changes deletion and absolute expiry exactly once — tests/bdd/features/cluster.feature:1109; invocation observed.
    • Rename overwrites the destination and preserves the source collection and expiration — tests/bdd/features/generic.feature:1042; invocation observed.
    • Sort resolves external hash weights and multiple GET patterns before limiting and storing — tests/bdd/features/generic.feature:1203; invocation observed.
    • A failed numeric sort cannot alter its store destination or the original collection — tests/bdd/features/generic.feature:1267; invocation observed.
    • Multi-element pushes have different argument ordering at each end — tests/bdd/features/lists.feature:9; command tag and invocation observed.
    • Conditional pushes never create missing lists and retain argument order — tests/bdd/features/lists.feature:45; invocation observed.
    • Zero counts do not consume and negative counts fail atomically (Scenario Outline) — tests/bdd/features/lists.feature:130; invocation observed.
    • Negative indexes and inclusive trim endpoints preserve list order — tests/bdd/features/lists.feature:163; invocation observed.
    • Removal counts select from the requested end without disturbing survivors — tests/bdd/features/lists.feature:225; invocation observed.
    • Insertion resolves the first pivot and reports missing pivots without mutation — tests/bdd/features/lists.feature:273; invocation observed.
    • Multi-pop honors key order, duplicates, direction, and the chosen key only — tests/bdd/features/lists.feature:373; invocation observed.
    • Single moves implement all endpoint combinations (Scenario Outline) — tests/bdd/features/lists.feature:420; invocation observed.
    • Legacy right-to-left move rotates a same-key list and preserves its expiry — tests/bdd/features/lists.feature:450; invocation observed.
    • Destination type errors cannot consume the source (Scenario Outline) — tests/bdd/features/lists.feature:494; invocation observed.
    • Batch movement returns destination order for all endpoints and modes (Scenario Outline) — tests/bdd/features/lists.feature:520; invocation observed.
    • Same-key batch selection happens before any push back (Scenario Outline) — tests/bdd/features/lists.feature:554; invocation observed.
    • Exactly is all-or-nothing and count bounds the available source — tests/bdd/features/lists.feature:586; invocation observed.
    • Blocking moves wake on source availability and insert at the destination end (Scenario Outline) — tests/bdd/features/lists.feature:664; invocation observed.
    • A blocked multi-pop consumes a batch from the first newly available list — tests/bdd/features/lists.feature:697; invocation observed.
    • Exactly blocking movement waits for the entire batch and preserves binary payloads — tests/bdd/features/lists.feature:726; invocation observed.
    • Blocked consumers have FIFO priority and cancellation removes a waiter — tests/bdd/features/lists.feature:784; invocation observed.
    • Blocking operations inside EXEC return immediately and later writes are not consumed — tests/bdd/features/lists.feature:858; invocation observed.
    • Resolved insertion and batch movement recover with ordering and binary values intact — tests/bdd/features/lists.feature:882; invocation observed.
    • Blocked requests do not survive a server lifecycle but completed effects do — tests/bdd/features/lists.feature:907; invocation observed.
    • An insertion wakes an exact batch after an earlier insufficient push — tests/bdd/features/lists.feature:938; invocation observed.
    • An exact batch timeout leaves a short source untouched — tests/bdd/features/lists.feature:980; invocation observed.
    • List commands reject incompatible source values without replacing them (Scenario Outline) — tests/bdd/features/lists.feature:1047; command tag and invocation observed.
    • String type errors never destroy a collection (Scenario Outline) — tests/bdd/features/strings.feature:1139; invocation observed.
    • AOF configuration inside EXEC preserves the saved committed prefix exactly once — tests/bdd/features/transactions_runtime.feature:66; invocation observed.
    • Graceful shutdown drains a save and its scheduled successor from EXEC — tests/bdd/features/transactions_runtime.feature:185; invocation observed.

    The following JSON arrays are the test harness’s argument vectors, not shell commands. Numeric arguments are converted by the harness; objects of the form {"base64":"…"} represent decoded binary bytes, not a literal JSON command argument. Preserve scenario setup and connection ordering. See the CLI guide for shell quoting and binary stdin. No reply is invented or inferred.

    Sort resolves external hash weights and multiple GET patterns before limiting and storing — tests/bdd/features/generic.feature:1241 (I execute:)

    [
    "LRANGE",
    "ids",
    0,
    -1
    ]

    Next source assertion: the reply equals:

    ["a","c","b"]

    Multi-element pushes have different argument ordering at each end — tests/bdd/features/lists.feature:27 (I execute:)

    [
    "LRANGE",
    "q",
    "0",
    "-1"
    ]

    Next source assertion: the reply equals:

    ["c","b","a","d","e"]

    A failed numeric sort cannot alter its store destination or the original collection — tests/bdd/features/generic.feature:1278 (I execute:)

    [
    "LRANGE",
    "result",
    0,
    -1
    ]

    Next source assertion: the reply equals:

    ["retained"]