Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/command-reference/acl/dryrun.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import PageTitle from '@site/src/components/PageTitle';

## Syntax

ACL DRYRUN username command
ACL DRYRUN username command [arg [arg ...]]

**ACL categories:** @admin, @slow, @dangerous

This command simulates the execution of a given command by a user.
This command simulates the execution of a given command and its arguments by a user.
It can be used to test the permissions without having to enable the user or cause the side effects of running the actual command.

## Return
Expand All @@ -32,5 +32,5 @@ dragonfly> ACL DRYRUN mike GET
OK

dragonfly> ACL DRYRUN mike SET
"This user has no permissions to run the 'set' command"
"This user has no permissions to run the 'SET' command"
```
79 changes: 79 additions & 0 deletions docs/command-reference/bloom-filter/bf.info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
description: Learn how to use Redis BF.INFO to inspect a Bloom filter in Dragonfly.
---

import PageTitle from '@site/src/components/PageTitle';

# BF.INFO

<PageTitle title="Redis BF.INFO Command (Documentation) | Dragonfly" />

## Syntax

BF.INFO key [CAPACITY | SIZE | FILTERS | ITEMS | EXPANSION]

**Time complexity:** O(F), where F is the number of sub-filters.

**ACL categories:** @bloom

Returns usage information and properties of the Bloom filter stored at `key`.
Without a selector, the command returns all available properties. With a
selector, it returns only that property's value.

## Selectors

| Selector | Description |
|---|---|
| `CAPACITY` | Total design capacity across completed sub-filters and the current sub-filter. The value can be greater than the capacity requested with `BF.RESERVE` because Dragonfly rounds the underlying storage size. |
| `SIZE` | Number of bytes allocated by the filter. |
| `FILTERS` | Number of sub-filters. |
| `ITEMS` | Number of items successfully inserted across all sub-filters. |
| `EXPANSION` | Growth factor used when another sub-filter is created. |

:::note Dragonfly compatibility

Dragonfly v1.40.0 supports the five selectors listed above. The `ERROR`,
`TIGHTENING`, and `MAXSCALEDCAPACITY` selectors from the
[Valkey command](https://valkey.io/commands/bf.info/) are not supported.

:::

## Return

- [Array reply](https://valkey.io/topics/protocol/#arrays): alternating property
names and integer values when no selector is provided.
- [Integer reply](https://valkey.io/topics/protocol/#integers): the requested
property value when a selector is provided.
- [Error reply](https://valkey.io/topics/protocol/#simple-errors): if `key` does
not exist, contains a different data type, or the selector is unsupported.

## Examples

```shell
dragonfly> BF.RESERVE visitors 0.01 1000
OK

dragonfly> BF.MADD visitors alice bob carol
1) (integer) 1
2) (integer) 1
3) (integer) 1

dragonfly> BF.INFO visitors
1) "Capacity"
2) (integer) 1485
3) "Size"
4) (integer) 2136
5) "Number of filters"
6) (integer) 1
7) "Number of items inserted"
8) (integer) 3
9) "Expansion rate"
10) (integer) 2

dragonfly> BF.INFO visitors ITEMS
(integer) 3
```

## See also

[`BF.RESERVE`](./bf.reserve.md) | [`BF.ADD`](./bf.add.md) | [`BF.MADD`](./bf.madd.md)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import PageTitle from '@site/src/components/PageTitle';

DFLYCLUSTER SLOT-MIGRATION-STATUS [node_id]

**Time complexity:** O(N), where N is the number of migrations on the node
**Time complexity:** O(M + R), where M is the number of migrations on the
node and R is the total number of their slot ranges.

**ACL categories:** @admin, @slow

Expand All @@ -28,17 +29,18 @@ For each migration, the following fields are returned:
- The `node_id` of the migration.
- The migration state, which can be `CONNECTING`, `SYNC`, `ERROR`, `FINISHED`, or `FATAL`.
- The number of keys for selected slots on the current node.
- The error status, which is `0` if no error happens. Otherwise, it shows the last error description.
- The error status, which is `0` when no error occurred. Otherwise, it shows the last error description.
- The slot ranges included in the migration, formatted as a string.

## Examples

```shell
# The current node is migrating out to 'node_xfsef234fs'.
# It is currently syncing the data of 2250125 keys.
# The current node finished migrating four keys in slots 3000 through 9000.
dragonfly> DFLYCLUSTER SLOT-MIGRATION-STATUS
1) 1) "out"
2) "node_xfsef234fs"
3) "SYNC"
4) (integer) 2250125
2) "133807dea9b616400e22587b99abd87a1cbf6473"
3) "FINISHED"
4) (integer) 4
5) "0"
6) "[3000, 9000]"
```
18 changes: 12 additions & 6 deletions docs/command-reference/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ sidebar_position: 0

# Dragonfly API Compatibility

This table tracks command-surface compatibility: whether Dragonfly accepts a
command and its documented options or subcommands. "Fully supported" does not
imply byte-for-byte identical behavior. See each command page for
Dragonfly-specific precision, limits, and other behavioral differences.

| Command Family | Command | Dragonfly Support | Details |
|:--|:--|:--|:--|
| <span class="family">Bitmap</span> | <span class="command">BITCOUNT</span> | <span class="support supported">Fully supported</span> | |
Expand Down Expand Up @@ -37,7 +42,7 @@ sidebar_position: 0
| | <span class="command">HELLO</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">PING</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">QUIT</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">RESET</span> | <span class="support unsupported">Unsupported</span> | |
| | <span class="command">RESET</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">SELECT</span> | <span class="support supported">Fully supported</span> | |
| <span class="family">Generic</span> | <span class="command">COPY</span> | <span class="support partial">Partially supported</span> | Missing: DB. |
| | <span class="command">DEL</span> | <span class="support supported">Fully supported</span> | |
Expand Down Expand Up @@ -76,12 +81,14 @@ sidebar_position: 0
| | <span class="command">HEXISTS</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HGET</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HGETALL</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HGETEX</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HINCRBY</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HINCRBYFLOAT</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HKEYS</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HLEN</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HMGET</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HMSET</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HPEXPIRETIME</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HRANDFIELD</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HSCAN</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">HSET</span> | <span class="support supported">Fully supported</span> | |
Expand Down Expand Up @@ -312,10 +319,9 @@ sidebar_position: 0
| | <span class="command">BF.INSERT</span> | <span class="support unsupported">Unsupported</span> | |
| | <span class="command">BF.SCANDUMP</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">BF.LOADCHUNK</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">BF.INFO</span> | <span class="support unsupported">Unsupported</span> | |
| | <span class="command">BF.INFO</span> | <span class="support partial">Partially supported</span> | Missing: ERROR, MAXSCALEDCAPACITY, TIGHTENING. |
| | <span class="command">BF.CARD</span> | <span class="support unsupported">Unsupported</span> | |
| | <span class="command">BF.DEBUG</span> | <span class="support unsupported">Unsupported</span> | |
| <span class="family">Cuckoo Filter</span> | <span class="command">TBD</span> | <span class="support unsupported">Unsupported</span> | |
| <span class="family">Count-Min Sketch</span> | <span class="command">CMS.INCRBY</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">CMS.INFO</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">CMS.INITBYDIM</span> | <span class="support supported">Fully supported</span> | |
Expand Down Expand Up @@ -350,7 +356,7 @@ sidebar_position: 0
| | <span class="command">JSON.TYPE</span> | <span class="support supported">Fully supported</span> | |
| <span class="family">Search</span> | <span class="command">FT.CREATE</span> | <span class="support partial">Partially supported</span> | Missing: DISABLE, ENABLE, INDEXALL, MAXTEXTFIELDS, NOFIELDS, NOFREQS, NOHL, PAYLOAD_FIELD, SCORE, SCORE_FIELD. |
| | <span class="command">FT.SEARCH</span> | <span class="support partial">Partially supported</span> | Missing: EXPANDER, EXPLAINSCORE, FIELDS, FRAGS, GEOFILTER, HIGHLIGHT, INFIELDS, INKEYS, INORDER, LEN, NOSTOPWORDS, PAYLOAD, SLOP, SUMMARIZE, TAGS, TIMEOUT, VERBATIM, WITHPAYLOADS. |
| | <span class="command">FT.HYBRID</span> | <span class="support partial">Partially supported</span> | Missing: ADHOC, BATCHES, BATCH_SIZE, COUNT_DISTINCTISH, EF_RUNTIME, EPSILON, FIRST_VALUE, NOSORT, OFFSET, POLICY, QUANTILE, RADIUS, RANDOM_SAMPLE, STDDEV, TIMEOUT, TIMESHARING, TIMESTAMP, TOLIST. |
| | <span class="command">FT.HYBRID</span> | <span class="support partial">Partially supported</span> | Missing: ADHOC, BATCHES, BATCH_SIZE, COUNT_DISTINCTISH, FIRST_VALUE, NOSORT, OFFSET, POLICY, QUANTILE, RANDOM_SAMPLE, STDDEV, TIMEOUT, TIMESHARING, TIMESTAMP, TOLIST. |
| | <span class="command">FT.ALTER</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">FT.DROPINDEX</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">FT.INFO</span> | <span class="support supported">Fully supported</span> | |
Expand All @@ -371,7 +377,7 @@ sidebar_position: 0
| | <span class="command">TOPK.COUNT</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">TOPK.LIST</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">TOPK.INFO</span> | <span class="support supported">Fully supported</span> | |
| <span class="family">CF</span> | <span class="command">CF.ADD</span> | <span class="support supported">Fully supported</span> | |
| <span class="family">Cuckoo Filter</span> | <span class="command">CF.ADD</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">CF.ADDNX</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">CF.COMPACT</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">CF.COUNT</span> | <span class="support supported">Fully supported</span> | |
Expand Down Expand Up @@ -415,4 +421,4 @@ sidebar_position: 0
| | <span class="command">READONLY</span> | <span class="support supported">Fully supported</span> | |
| | <span class="command">READWRITE</span> | <span class="support supported">Fully supported</span> | |

Verification: Dragonfly v1.39.0; Redis 8.6.4; modules: BF, CF, CMS, FT, JSON, TDIGEST, TOPK, TS.
Verification: Dragonfly v1.40.0; Redis 8.6.4; modules: BF, CF, CMS, FT, JSON, TDIGEST, TOPK, TS.
2 changes: 1 addition & 1 deletion docs/command-reference/count-min-sketch/cms.incrby.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import PageTitle from '@site/src/components/PageTitle';

**Time complexity:** O(n) where n is the number of items

**ACL categories:** @cms, @fast
**ACL categories:** @cms, @fast, @write

Increments the count of one or more `item`s in the Count-Min Sketch stored at `key` by the given `increment` values.
The `increment` value must be a positive integer greater than `0`.
Expand Down
2 changes: 1 addition & 1 deletion docs/command-reference/count-min-sketch/cms.initbydim.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import PageTitle from '@site/src/components/PageTitle';

**Time complexity:** O(1)

**ACL categories:** @cms, @fast
**ACL categories:** @cms, @fast, @write

Initializes a Count-Min Sketch filter at `key` with the given `width` and `depth` dimensions.

Expand Down
2 changes: 1 addition & 1 deletion docs/command-reference/count-min-sketch/cms.initbyprob.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import PageTitle from '@site/src/components/PageTitle';

**Time complexity:** O(1)

**ACL categories:** @cms, @fast
**ACL categories:** @cms, @fast, @write

Initializes a Count-Min Sketch filter at `key` with dimensions automatically calculated from
the desired `error` rate and `probability` of accuracy.
Expand Down
2 changes: 1 addition & 1 deletion docs/command-reference/count-min-sketch/cms.merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import PageTitle from '@site/src/components/PageTitle';

**Time complexity:** O(n·w·d) where n is the number of source sketches, w is the width, and d is the depth

**ACL categories:** @cms, @slow
**ACL categories:** @cms, @slow, @write

Merges multiple source Count-Min Sketches into `destination`.
The `destination` key must be pre-initialized via [`CMS.INITBYDIM`](./cms.initbydim.md) or [`CMS.INITBYPROB`](./cms.initbyprob.md) before calling this command — if it does not exist, an error is returned.
Expand Down
2 changes: 1 addition & 1 deletion docs/command-reference/cuckoo-filter/cf.add.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import PageTitle from '@site/src/components/PageTitle';

**Time complexity:** O(k + i), where k is the number of sub-filters and i is `MAXITERATIONS`

**ACL categories:** @cuckoo
**ACL categories:** @cuckoo_filter, @slow, @write

Adds a single `item` to the Cuckoo filter at `key`.
If `key` does not exist, a new filter is created with default parameters.
Expand Down
2 changes: 1 addition & 1 deletion docs/command-reference/cuckoo-filter/cf.addnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import PageTitle from '@site/src/components/PageTitle';

**Time complexity:** O(k + i), where k is the number of sub-filters and i is `MAXITERATIONS`

**ACL categories:** @cuckoo
**ACL categories:** @cuckoo_filter, @slow, @write

Adds a single `item` to the Cuckoo filter at `key` only if it does not already exist.
If `key` does not exist, a new filter is created with default parameters.
Expand Down
17 changes: 10 additions & 7 deletions docs/command-reference/cuckoo-filter/cf.compact.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ import PageTitle from '@site/src/components/PageTitle';

CF.COMPACT key

**Time complexity:** O(k), where k is the number of sub-filters
**Time complexity:** O(S × k) in the worst case, where S is the total number of fingerprint slots and k is the number of sub-filters.

**ACL categories:** @cuckoo
**ACL categories:** @cuckoo_filter, @slow, @write

Attempts to compact the Cuckoo filter at `key` by consolidating its sub-filters.

When a filter expands, older sub-filters are kept around until [`CF.DEL`](./cf.del.md) empties
them out. `CF.DEL` already triggers this automatically once deletions exceed 10% of the items in
the filter, so `CF.COMPACT` mainly exists to force the pass on demand, for example after a batch
of deletions.
Compaction scans newer sub-filters and tries to move their fingerprints into
free slots in older sub-filters. It can remove a sub-filter only when the newest
one becomes completely empty.

[`CF.DEL`](./cf.del.md) automatically runs a compaction pass when accumulated
deletions exceed one tenth of the remaining items. `CF.COMPACT` forces a full
pass on demand, for example after a batch of deletions.

## Return

Expand All @@ -44,7 +47,7 @@ dragonfly> CF.COMPACT cf
OK

dragonfly> CF.COMPACT no_such_key
(error) no such key
(error) ERR no such key
```

## See also
Expand Down
4 changes: 2 additions & 2 deletions docs/command-reference/cuckoo-filter/cf.count.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import PageTitle from '@site/src/components/PageTitle';

**Time complexity:** O(k), where k is the number of sub-filters

**ACL categories:** @cuckoo
**ACL categories:** @cuckoo_filter, @fast, @read

Returns the number of times `item` occurs in the Cuckoo filter at `key`.

Since [`CF.ADD`](./cf.add.md) allows duplicate insertions, the same item can occupy more than one
slot. `CF.COUNT` reports how many slots currently match `item`, which may include false positives.

If `key` does not exist, `0` is returned.
If `key` does not exist or holds a value of a different type, `0` is returned.

## Return

Expand Down
6 changes: 3 additions & 3 deletions docs/command-reference/cuckoo-filter/cf.del.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import PageTitle from '@site/src/components/PageTitle';

CF.DEL key item

**Time complexity:** O(k), where k is the number of sub-filters
**Time complexity:** Normally O(k), where k is the number of sub-filters. If the deletion triggers automatic compaction, the worst case is O(S × k), where S is the total number of fingerprint slots.

**ACL categories:** @cuckoo
**ACL categories:** @cuckoo_filter, @fast, @write

Removes a single occurrence of `item` from the Cuckoo filter at `key`.

Expand Down Expand Up @@ -48,7 +48,7 @@ dragonfly> CF.DEL cf Hello
(integer) 0

dragonfly> CF.DEL no_such_key Hello
(error) no such key
(error) ERR no such key
```

## See also
Expand Down
4 changes: 2 additions & 2 deletions docs/command-reference/cuckoo-filter/cf.exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import PageTitle from '@site/src/components/PageTitle';

**Time complexity:** O(k), where k is the number of sub-filters

**ACL categories:** @cuckoo
**ACL categories:** @cuckoo_filter, @fast, @read

Checks whether `item` exists in the Cuckoo filter at `key`.

Expand All @@ -22,7 +22,7 @@ still be reported as present due to a fingerprint collision. False negatives are
not possible: if an item was inserted and never deleted, `CF.EXISTS` will always
return `1`.

If `key` does not exist, `0` is returned.
If `key` does not exist or holds a value of a different type, `0` is returned.

## Return

Expand Down
Loading
Loading