Skip to content
Search ffkv docs

Search the complete handbook, locally.

    TS.CREATE

    Create a new time series

    Browse all commands · Upstream source documentation

    Reference fieldValue
    Canonical nameTS.CREATE
    Catalog groupTime series commands
    Upstream since1.0.0 — upstream Redis/module version, not an ffkv release
    Pinned catalogRedis 8.10.0
    TS.CREATE key [RETENTION retentionPeriod] [ENCODING <UNCOMPRESSED |
    COMPRESSED>] [CHUNK SIZE size] [DUPLICATE POLICY <BLOCK | FIRST |
    LAST | MIN | MAX | SUM>] [LABELS label value [label value ...]]

    Time-series chunks, retention, labels and live compaction rules are implemented in RAM. TS.READ BLOCK uses bounded actor waiters and is rejected in EXEC/Lua; other reads may be used without blocking. Hybrid does not offload time-series chunks.

    Source: README.md:294, 351–353, 375–377; tests/bdd/features/timeseries.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.

    This command is in the canonical catalog but has no matching entry in the pinned src/command_metadata.json. Argument flags, complexity and key specifications are not invented. Use the syntax, upstream source documentation and actual scenario evidence below.

    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.

    • Explicit retention and duplicate policies govern updates and pruning — tests/bdd/features/timeseries.feature:5; command tag and invocation observed.
    • Counter deltas and inclusive deletion retain the correct remaining samples — tests/bdd/features/timeseries.feature:116; invocation observed.
    • Range order filters and multi-aggregator statistics follow sample values — tests/bdd/features/timeseries.feature:172; invocation observed.
    • NaN samples remain visible while aggregation counts distinguish missing numbers — tests/bdd/features/timeseries.feature:212; invocation observed.
    • Compaction exposes closed and open buckets and deleting its rule stops future output — tests/bdd/features/timeseries.feature:244; invocation observed.
    • Label indexes and filtered multi-series queries reflect changed metadata — tests/bdd/features/timeseries.feature:317; invocation observed.
    • Named-series queries group unequal timestamps without fabricating absent samples — tests/bdd/features/timeseries.feature:375; invocation observed.
    • Blocking reads wait for the requested number of samples then return values in order — tests/bdd/features/timeseries.feature:399; invocation observed.
    • Time-weighted aggregation of a constant signal preserves its measured level — tests/bdd/features/timeseries.feature:440; invocation observed.
    • Deleting the latest source bucket durably reopens the previous compaction bucket — tests/bdd/features/timeseries.feature:457; invocation observed.
    • Deleting every source sample resets compaction before earlier timestamps are reinserted — tests/bdd/features/timeseries.feature:519; 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.

    Explicit retention and duplicate policies govern updates and pruning — tests/bdd/features/timeseries.feature:8 (client “ts3” executes:)

    [
    "TS.CREATE",
    "sensor",
    "RETENTION",
    100,
    "DUPLICATE_POLICY",
    "BLOCK",
    "LABELS",
    "room",
    "study"
    ]

    Next source assertion: the reply equals:

    "OK"

    Compaction exposes closed and open buckets and deleting its rule stops future output — tests/bdd/features/timeseries.feature:247 (the following commands succeed:)

    [
    "TS.CREATE",
    "raw"
    ]

    Deleting the latest source bucket durably reopens the previous compaction bucket — tests/bdd/features/timeseries.feature:460 (the following commands succeed:)

    [
    "TS.CREATE",
    "avg"
    ]