Skip to content

chore: add Cuckoo Filter command docs - #551

Merged
vyavdoshenko merged 3 commits into
mainfrom
kcuckoo
Aug 4, 2026
Merged

chore: add Cuckoo Filter command docs#551
vyavdoshenko merged 3 commits into
mainfrom
kcuckoo

Conversation

@kostasrim

Copy link
Copy Markdown
Contributor
  • CF.ADD, CF.ADDNX, CF.COMPACT
  • CF.COUNT, CF.DEL, CF.EXISTS
  • CF.INFO, CF.INSERT, CF.INSERTNX
  • CF.MEXISTS, CF.RESERVE
  • update compatibility table

* CF.ADD, CF.ADDNX, CF.COMPACT
* CF.COUNT, CF.DEL, CF.EXISTS
* CF.INFO, CF.INSERT, CF.INSERTNX
* CF.MEXISTS, CF.RESERVE
* update compatibility table

Signed-off-by: Kostas Kyrimis <kostas@dragonflydb.io>
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview Aug 4, 2026 8:41am

Request Review

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add Cuckoo Filter command reference docs and update compatibility table

📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Add command reference pages for core Cuckoo Filter (CF.*) commands.
• Introduce a dedicated “Cuckoo Filter” docs category with generated index.
• Update the command compatibility table to mark supported CF commands.
Diagram

graph TD
  A([Docs site]) --> B["Command reference"] --> C["Cuckoo Filter category"] --> D["CF.* command pages"]
  B --> E["Compatibility table"]
  C --> F["Generated index"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Generate command docs from a single command spec
  • ➕ Keeps syntax/complexity/return types consistent across commands
  • ➕ Reduces drift when behavior changes (one source of truth)
  • ➕ Enables automated cross-links and compatibility updates
  • ➖ Requires building/maintaining a spec format and generator
  • ➖ Harder to add nuanced narrative details per command
2. Add a Cuckoo Filter overview page plus fewer per-command pages
  • ➕ Improves discoverability of concepts (false positives/negatives, deletion semantics)
  • ➕ Reduces duplication of shared explanations across commands
  • ➖ Less direct per-command landing pages for search/SEO
  • ➖ May not match existing command-reference organization

Recommendation: The PR’s approach (dedicated per-command pages under a new category) fits a command-reference structure well and is easy to navigate. If CF behavior is expected to evolve, consider a lightweight command-spec-driven generation approach later to prevent drift between docs, examples, and the compatibility table.

Files changed (13) +614 / -10

Documentation (12) +610 / -10
compatibility.mdMark CF commands as fully supported in compatibility table +11/-10

Mark CF commands as fully supported in compatibility table

• Updates the CF command family rows to reflect full support for CF.ADD/ADDNX/COMPACT/COUNT/DEL/EXISTS/INFO/INSERT/INSERTNX/MEXISTS/RESERVE. Leaves other CF commands (e.g., LOADCHUNK/SCANDUMP) marked unsupported.

docs/command-reference/compatibility.md

cf.add.mdDocument CF.ADD command +48/-0

Document CF.ADD command

• Adds syntax, complexity, return values, and examples for inserting items with duplicates allowed. Includes guidance on removing duplicates via CF.DEL and cross-links to related CF commands.

docs/command-reference/cuckoo-filter/cf.add.md

cf.addnx.mdDocument CF.ADDNX command +49/-0

Document CF.ADDNX command

• Adds syntax, complexity, return values, and examples for inserting an item only if it does not already exist. Notes false-positive implications of existence checks and links to related commands.

docs/command-reference/cuckoo-filter/cf.addnx.md

cf.compact.mdDocument CF.COMPACT command +52/-0

Document CF.COMPACT command

• Documents compaction semantics across sub-filters, including when compaction is otherwise triggered by CF.DEL. Provides return types, error cases, and examples.

docs/command-reference/cuckoo-filter/cf.compact.md

cf.count.mdDocument CF.COUNT command +50/-0

Document CF.COUNT command

• Documents counting occurrences (including duplicates and possible false positives) and the behavior when the key is missing. Includes usage examples and related links.

docs/command-reference/cuckoo-filter/cf.count.md

cf.del.mdDocument CF.DEL command +56/-0

Document CF.DEL command

• Documents deletion of a single occurrence, including duplicate-handling and the risk of false negatives when over-deleting. Provides return values, error cases, examples, and related links.

docs/command-reference/cuckoo-filter/cf.del.md

cf.exists.mdDocument CF.EXISTS command +52/-0

Document CF.EXISTS command

• Adds command reference for membership checks, emphasizing false positives but no false negatives (absent deletions). Includes behavior for missing keys and links to multi-exists and related operations.

docs/command-reference/cuckoo-filter/cf.exists.md

cf.info.mdDocument CF.INFO command +68/-0

Document CF.INFO command

• Documents the fields returned by CF.INFO (size, buckets, filters, inserted/deleted counts, configuration). Includes example output formatting and error behavior.

docs/command-reference/cuckoo-filter/cf.info.md

cf.insert.mdDocument CF.INSERT command +59/-0

Document CF.INSERT command

• Adds documentation for batch inserts with optional CAPACITY and NOCREATE handling. Specifies per-item integer replies, error cases, and examples.

docs/command-reference/cuckoo-filter/cf.insert.md

cf.insertnx.mdDocument CF.INSERTNX command +58/-0

Document CF.INSERTNX command

• Documents batch insertion without duplicates, including per-item return codes for already-existing items and full filters. Includes parameters, examples, and cross-links.

docs/command-reference/cuckoo-filter/cf.insertnx.md

cf.mexists.mdDocument CF.MEXISTS command +53/-0

Document CF.MEXISTS command

• Adds documentation for multi-item existence checks with one integer reply per input item. Notes false positives, missing-key behavior, examples, and related links.

docs/command-reference/cuckoo-filter/cf.mexists.md

cf.reserve.mdDocument CF.RESERVE command +54/-0

Document CF.RESERVE command

• Documents explicit filter creation and sizing/tuning parameters (BUCKETSIZE, MAXITERATIONS, EXPANSION). Includes default values, error cases, and examples.

docs/command-reference/cuckoo-filter/cf.reserve.md

Other (1) +4 / -0
_category_.ymlAdd Cuckoo Filter docs category with generated index +4/-0

Add Cuckoo Filter docs category with generated index

• Introduces a new Docusaurus category for Cuckoo Filter docs, positioned in the sidebar and configured to generate an index page.

docs/command-reference/cuckoo-filter/category.yml

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Aug 4, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Conflicting full-filter return ✓ Resolved 🐞 Bug ≡ Correctness
Description
The new CF.ADD docs state that a full filter with EXPANSION 0 returns an error, but the same
page’s Return section documents an Integer 0 for the full/non-expandable case; CF.ADDNX similarly
mentions an error but doesn’t document that case in its Return section. This contradiction can cause
users to implement incorrect response/error handling for “filter full” scenarios.
Code

docs/command-reference/cuckoo-filter/cf.add.md[24]

+If the filter is full and expansion is disabled (`EXPANSION 0`), an error is returned.
Evidence
In CF.ADD, the body text claims an error is returned for EXPANSION 0 when full, while the Return
section documents an Integer 0 for the filter-full/non-expandable condition; CF.ADDNX contains the
same “error” claim without documenting that case under Return.

docs/command-reference/cuckoo-filter/cf.add.md[18-32]
docs/command-reference/cuckoo-filter/cf.addnx.md[18-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`CF.ADD` documentation contradicts itself for the “filter full and cannot expand (EXPANSION 0)” scenario: one section says it returns an error, while the Return section documents an Integer `0`. `CF.ADDNX` mentions an error for the same scenario, but its Return section omits any mention of the full-filter outcome.
### Issue Context
These pages are newly added in this PR, so the inconsistency is introduced here.
### Fix Focus Areas
- docs/command-reference/cuckoo-filter/cf.add.md[24-32]
- docs/command-reference/cuckoo-filter/cf.addnx.md[25-33]
### What to change
1. Verify the actual Dragonfly behavior for `CF.ADD` and `CF.ADDNX` when the filter is full and expansion is disabled.
2. Update both pages so the narrative text and the Return section describe the same RESP reply type and value (error vs integer return), and ensure `CF.ADDNX` documents the full-filter behavior in its Return section if applicable.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread docs/command-reference/cuckoo-filter/cf.add.md
Signed-off-by: Kostas Kyrimis <kostas@dragonflydb.io>
@vyavdoshenko
vyavdoshenko merged commit 0715ee8 into main Aug 4, 2026
3 checks passed
@vyavdoshenko
vyavdoshenko deleted the kcuckoo branch August 4, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants