Skip to content

feature: Add Bloom Filter (BF.*) support to Lettuce #3759 - #3760

Merged
a-TODO-rov merged 32 commits into
redis:mainfrom
Dgramada:bloom-filter
Jun 5, 2026
Merged

a-TODO-rov merged 32 commits into
redis:mainfrom
Dgramada:bloom-filter

Conversation

@Dgramada

@Dgramada Dgramada commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Add Bloom Filter support to Redis. First commit is a draft of the sync command API.


Make sure that:

  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You applied code formatting rules using the mvn formatter:format target. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

Note

Medium Risk
Large additive API surface with custom RESP parsing and error-tolerant outputs for insert/madd; cluster read-only command set grows, but changes mirror existing module patterns and are covered by unit and integration tests.

Overview
Adds Redis Bloom Filter (BF.*) client support across sync, async, reactive, Kotlin coroutines, and cluster node-selection APIs, following the same module pattern as other Redis Stack features.

Command surface: bfAdd, bfCard, bfExists, bfInfo, bfInsert (with BfInsertArgs), bfMAdd, bfMExists, bfReserve (with BfReserveArgs), bfScanDump, and bfLoadChunk. Protocol wiring adds CommandType entries, CommandKeyword options (CAPACITY, ITEMS, NONSCALING, etc.), and marks BF_CARD, BF_EXISTS, BF_INFO, and BF_MEXISTS as read-only for cluster routing.

Implementation: RedisBloomFilterCommandBuilder encodes commands; BfInfoValue / BfScanDumpValue use dedicated parsers. BF.INSERT and BF.MADD use new error-tolerant list outputs so per-item failures map to null (async/sync) or Value.empty() (reactive) when a non-scaling filter is full. Reactive insert/madd use separate bfInsertValues / bfMAddValues builders for Flux<Value<Boolean>>.

Integration: AbstractRedisAsyncCommands and AbstractRedisReactiveCommands implement the new interfaces; aggregate Redis*Commands types extend RedisBloomFilter*Commands. API generator template RedisBloomFilterCommands is registered in test constants. Unit tests cover RESP encoding; integration tests cover standalone, RESP2, reactive, and cluster.

Reviewed by Cursor Bugbot for commit 60b5695. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
@Dgramada
Dgramada requested a review from a-TODO-rov May 19, 2026 11:56
@Dgramada Dgramada linked an issue May 19, 2026 that may be closed by this pull request
@Dgramada Dgramada changed the title Add draft sync command interface for Bloom Filter (BF.*) #3759 feature: Add Bloom Filter (BF.*) support to Lettuce #3759 May 19, 2026
…f a map.

Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
@a-TODO-rov
a-TODO-rov requested a review from uglide May 20, 2026 07:35
Dgramada added 3 commits May 20, 2026 13:09
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Dgramada added 4 commits May 21, 2026 17:24
…oomFilterCommandBuilder logic.

Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Dgramada and others added 5 commits May 26, 2026 22:06
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
# Conflicts:
#	src/main/java/io/lettuce/core/AbstractRedisAsyncCommands.java
#	src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java
#	src/main/java/io/lettuce/core/api/async/RedisAsyncCommands.java
#	src/main/java/io/lettuce/core/api/reactive/RedisReactiveCommands.java
#	src/main/java/io/lettuce/core/api/sync/RedisCommands.java
#	src/main/java/io/lettuce/core/cluster/api/async/RedisClusterAsyncCommands.java
#	src/main/java/io/lettuce/core/cluster/api/reactive/RedisClusterReactiveCommands.java
#	src/main/java/io/lettuce/core/cluster/api/sync/RedisClusterCommands.java
#	src/main/java/io/lettuce/core/protocol/CommandKeyword.java
#	src/main/kotlin/io/lettuce/core/api/coroutines/RedisCoroutinesCommandsImpl.kt
#	src/test/java/io/lettuce/apigenerator/Constants.java
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
@Dgramada
Dgramada marked this pull request as ready for review May 27, 2026 10:12
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Dgramada added 6 commits June 2, 2026 15:05
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>

@a-TODO-rov a-TODO-rov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comment:
Some new files lack license header, the ones that do are inconsistent between each other. Please consult with @uglide what the latest state of the license header should look like, because i don't know myself.
Some inline comments:

@uglide

uglide commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

General comment: Some new files lack license header, the ones that do are inconsistent between each other. Please consult with @uglide what the latest state of the license header should look like, because i don't know myself. Some inline comments:

@Dgramada @a-TODO-rov something like:

// Copyright (c) 2026-Present, Redis Ltd. All rights reserved.
// SPDX-License-Identifier: MIT

is more than enough

Dgramada added 3 commits June 4, 2026 13:39
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Dgramada added 2 commits June 4, 2026 17:01
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
Signed-off-by: yordantsintsov <yordan.tsintsov@gmail.com>
@Dgramada
Dgramada requested a review from a-TODO-rov June 5, 2026 10:23

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit e6644d0. Configure here.

@a-TODO-rov
a-TODO-rov merged commit a2878c1 into redis:main Jun 5, 2026
14 checks passed
@Dgramada
Dgramada deleted the bloom-filter branch June 5, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants

⌂ 换网址