Skip to content

DOC-6827 Prepare Lettuce probabilistic data type docs - #3610

Open
andy-stark-redis wants to merge 1 commit into
mainfrom
DOC-6827-prepare-lettuce-probabilistic-data-type-docs
Open

DOC-6827 Prepare Lettuce probabilistic data type docs#3610
andy-stark-redis wants to merge 1 commit into
mainfrom
DOC-6827-prepare-lettuce-probabilistic-data-type-docs

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

DOC-6827 — Lettuce probabilistic data type docs

Adds Lettuce (Java) coverage for the probabilistic data types, in two parts.

Examples

Staged Lettuce async + reactive doctests (local_examples/<set>/lettuce-async|lettuce-reactive/) for:

Set Data-type page
bf_tutorial Bloom filter
cuckoo_tutorial Cuckoo filter
cms_tutorial Count-min sketch
topk_tutorial Top-K
tdigest_tutorial t-digest
hll_tutorial HyperLogLog
home_prob_dts combined rundown / landing

The per-type data-type pages embed clients-example without a lang_filter, so the new Java-Async / Java-Reactive tabs appear automatically once the example pipeline regenerates examples.json — no edits to those pages needed.

Rundown page

New content/develop/clients/lettuce/prob.md, adapted from the Jedis page, with lang_filter="Java-Async,Java-Reactive".

⚠️ Preemptive work — reads against unreleased API

Probabilistic command support is not in a released lettuce-core yet. Examples are written against the Lettuce feature PRs:

A Codex review flagged every non-HLL call as an unknown method; that's expected against the pinned released jar, not a defect. When the features release: re-pin lettuce-core, re-run the doctest harness (the REMOVE-block asserts become real oracles then), and re-diff the CMS/t-digest signatures. CMS/t-digest are the higher-risk pair to re-verify.

⚠️ Forward risk — Lettuce 8.x reactive-accessor removal (pickup trigger)

All seven lettuce-reactive examples obtain their commands via connection.reactive() (returning RedisReactiveCommands). Somewhere in the Lettuce 8.x "reactor-optional" work, the reactive() accessor is removed — reactive commands move to connection.commands(RedisReactiveCommands.factory()). Related 8.x churn already merged: EventBus rework #3789 / Flux-surface removal #3790.

Pickup trigger: if the release that ships the probabilistic methods also removes reactive(), every reactive example must be migrated from connection.reactive() to connection.commands(RedisReactiveCommands.factory()) before merge (and prob.md's prose at the top of the reactive section updated to match).

✅ Trigger now PINNED — resolved 2026-08-07 (/pr-scan-review)

This supersedes the 2026-08-06 "UNPINNED" note kept below. The PR that actually removes the
reactive() accessor has been located and verified against live diffs on 2026-08-07:

PR Role State @ 2026-08-07 Base Head
#3781 "Add connection.commands(factory) accessor and deprecate reactive()" Deprecation only — already on main, reactive() still works merged 2026-06-16, 30 files main a0bf2ca
#3731 "[reactor-optional] Make 'Project Reactor' optional dependency" THE PIN — the PR that deletes reactive() open, not merged, 155 files, updated 2026-07-17 main eff68e7
#3787 "[reactor-optional] Change reactive accessor" Feature-branch step; not a release path on its own merged 2026-07-06 into the feature branch, 89 files feature/reactor-optional-1 d806114

Verified in #3731's diff — reactive() and its backing field are deleted, not merely deprecated:
api/StatefulRedisConnection.java (−16), StatefulRedisConnectionImpl.java (−31),
cluster/api/StatefulRedisClusterConnection.java (−17), StatefulRedisClusterConnectionImpl.java (−23),
pubsub/StatefulRedisPubSubConnection.java (−16), sentinel/api/StatefulRedisSentinelConnection.java (−16),
plus the cluster-pubsub, MultiDb and Kotlin-extension variants. The removed Javadoc reads
"@deprecated since 7.7, use commands(...) with RedisReactiveCommands#factory() instead; scheduled for removal"
so 7.7 deprecates and #3731 carries the removal onto main.

Pickup trigger (now testable): #3731 merged into main and shipped in a released lettuce-core tag —
testably, a tag where StatefulRedisConnection no longer declares reactive().
gh api repos/redis/lettuce/pulls/3731 --jq '{state,merged,head_sha:.head.sha,base:.base.ref,updated_at}'

Scope note — the risk is wider than this PR. All 7 lettuce-reactive files here use connection.reactive(),
but so do ~30 files repo-wide (local_examples/*/lettuce-reactive/, the five
content/develop/use-cases/*/java-lettuce/ examples, and content/develop/clients/lettuce/). If #3731 ships
before this PR merges, migrate only these 7 files to connection.commands(RedisReactiveCommands.factory())
to unblock the merge, and raise the repo-wide migration as its own ticket rather than widening this one.

Superseded 2026-08-06 note (kept for the record)

⚠️ This trigger is currently UNPINNED — re-pin it before relying on it

Corrected 2026-08-06 (/pr-scan-review). This section previously named Lettuce
#3842 as the PR that removes reactive(). That is no longer true of
#3842's diff.
Verified against the live PR on 2026-08-06:

  • #3842 is titled "[reactor-optional] Credentials as adapter 8x", targets feature/reactor-optional-1, is still
    open, and last moved 2026-07-14.
  • Its diff is 21 files, all credentials/connect-path (CredentialsProvider, AsyncCredentialsProviderAdapter,
    RedisHandshake, ConnectionState, RedisURI, RedisClient, RedisClusterClient, the authx classes, and tests).
    There is no StatefulRedisConnection/StatefulRedisClusterConnection impl in the diff, and no accessor removal.
  • The Bugbot summary inside #3842's own body does describe removing eager reactive() fields and methods — but it
    reviewed commit 404f10f9 and is stale against the current diff. Do not treat that summary as the pin.

So the risk described above is still believed real (the reactor-optional umbrella is broad, and #3842 may simply have
been narrowed with the accessor removal split out elsewhere), but this PR no longer pins the PR that carries it.

On /unpark, before anything else: locate the PR or commit that actually removes the reactive() accessor —
search redis/lettuce for changes to StatefulRedisConnection/StatefulRedisConnectionImpl and for
commands(RedisReactiveCommands.factory()) — and record it here with its state, base branch and head SHA. If no such
change exists on a branch heading for a release, downgrade this from a pickup trigger to a watch item and say so.

🤖 Generated with Claude Code


Note

Medium Risk
Documentation-only, but examples depend on probabilistic APIs not yet in released lettuce-core (especially CMS and t-digest), so CI or readers on the current jar may fail until dependencies and signatures are updated.

Overview
Adds Lettuce client documentation for Redis probabilistic data types: a new content/develop/clients/lettuce/prob.md overview (mirroring other client prob pages) with embedded clients-example snippets filtered to Java-Async and Java-Reactive.

Introduces doctest-style Java examples under local_examples/ for Bloom filter, Cuckoo filter, Count-min sketch, Top-K, t-digest, HyperLogLog, plus a combined home_prob_dts set—each in async and reactive variants using STEP_START/STEP_END markers for doc extraction.

Examples call probabilistic commands on RedisAsyncCommands / RedisReactiveCommands (e.g. bfReserve, cmsInitByProb, tdigestCreate, topKReserve) so Java-Async / Java-Reactive tabs can appear on existing data-type pages after examples.json regeneration, without editing those pages in this PR.

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

Stage Lettuce async + reactive doctests for the bloom, cuckoo, CMS, top-k,
t-digest and HLL tutorial sets plus the combined home_prob_dts set, and add the
client-specific rundown page at content/develop/clients/lettuce/prob.md.

This is preemptive work: probabilistic command support is not in a released
lettuce-core yet, so the examples are written against the Lettuce feature PRs
(BF/CF/top-k merged to main; CMS and t-digest still open on the Dgramada fork,
so their signatures may still shift). A Codex review flagged every non-HLL call
as an unknown method - that is expected against the repo's pinned released jar,
not a defect. Multi-step sets (t-digest, home_prob_dts) are authored as
self-contained per-STEP blocks rather than one method chain threaded through the
STEP markers, because the clients-example shortcode extracts each step by line
range and a threaded chain renders as broken mid-chain fragments.

Learned: multi-step doctests must be self-contained per STEP block or the shortcode extracts broken mid-chain fragments
Constraint: each STEP_START/STEP_END block must stand alone (its own async chain, or per-statement reactive blocks), never span a single threaded method chain
Rejected: one async/reactive chain threaded through all STEP markers | shortcode extracts per-step line ranges, so a threaded chain yields uncompilable fragments
Recheck: when Lettuce CMS (redis/lettuce#3821) and t-digest (#3823) merge and release - re-pin lettuce-core, re-run the doctest harness so the REMOVE-block asserts become real oracles, and re-diff the CMS/t-digest signatures
Ticket: DOC-6827
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

DOC-6827

@github-actions

Copy link
Copy Markdown
Contributor

@andy-stark-redis andy-stark-redis self-assigned this Jul 10, 2026
@andy-stark-redis andy-stark-redis added the parked PR speculatively added based on pre-release info. Check validity when release goes ahead. label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge yet parked PR speculatively added based on pre-release info. Check validity when release goes ahead.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant