Skip to content

DOC-6503 Add missing trans/pipe and error-handling pages (Lettuce, redis-rb, Predis)#3654

Merged
andy-stark-redis merged 3 commits into
mainfrom
DOC-6503-err-trans-pipes
Jul 20, 2026
Merged

DOC-6503 Add missing trans/pipe and error-handling pages (Lettuce, redis-rb, Predis)#3654
andy-stark-redis merged 3 commits into
mainfrom
DOC-6503-err-trans-pipes

Conversation

@andy-stark-redis

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

Copy link
Copy Markdown
Contributor

DOC-6503 — Add missing trans/pipe and error-handling client pages

Fills the gaps flagged in the ticket: pipelines/transactions and error-handling pages were missing for some of the less-popular clients.

Pages added

Examples are runnable and verified

The transpipe pages use real TCE examples (new sources under local_examples/client-specific/{lettuce-sync,lettuce-async,lettuce-reactive,ruby}/), each verified end-to-end against a live Redis 8.8 via the example-test-harness (extended here with lettuce-sync support). Error-handling code blocks are illustrative, matching the existing jedis page.

Notes for review

  • Exception hierarchies on all three error-handling pages were fact-checked against the real client libraries (Lettuce 6.5.5, redis-rb 5.4.1, Predis 3.4.2).
  • Two Lettuce idioms are deliberate, not accidental: the "sync" pipeline example uses the async API + RedisFuture (Lettuce's sync commands block per reply and can't be batched), and the reactive pipeline uses flatMapSequential (eager + ordered) rather than Flux.concat (which would serialize the round-trips).
  • A Codex review pass has already been applied (reactive pipelining, redis-rb WATCH nil-abort handling, Predis hierarchy ellipsis, Lettuce interrupt handling).

🤖 Generated with Claude Code


Note

Low Risk
Documentation and example-test-harness changes only; no production application or runtime behavior changes.

Overview
Adds pipelines/transactions docs for Lettuce (sync, async, reactive) and redis-rb, and error-handling docs for Lettuce, redis-rb, and Predis, wired from the shared error handling overview.

Transpipe pages pull from a new pipe_trans_tutorial example set: runnable Lettuce TransPipeExample sources (sync/async/reactive) and Ruby transpipe.rb, covering pipelines, MULTI/EXEC, and WATCH. The example-test-harness gains lettuce-sync (new POM + run_lettuce_sync) and run.sh mappings so those examples can be executed in CI-style runs.

Client error-handling pages mirror the existing Jedis-style layout: exception hierarchies, key exception tables, the four overview patterns in client syntax, plus Lettuce async/reactive notes, Predis transaction retries, and redis-rb’s nil from aborted watched transactions.

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

…b, Predis

Adds the pipelines/transactions pages for Lettuce (sync, async, and reactive)
and redis-rb, plus the error-handling pages for Lettuce, redis-rb, and Predis,
closing the gaps against the other clients. The transpipe examples are new TCE
sources in local_examples/, verified end to end against a live Redis via the
example-test-harness (which gained lettuce-sync support). Two non-obvious things
drove the code. Lettuce's synchronous API cannot pipeline (each sync call blocks
on its reply), so the "sync" pipeline example deliberately drops to the async
API and RedisFutures. And the reactive MULTI/EXEC example nests subscribe()
calls inside multi().flatMap(...) — that reads like fire-and-forget but is
load-bearing, because the queued commands only land between MULTI and EXEC by
being dispatched in subscription order on the single shared connection.

Learned: Lettuce sync can't pipeline (must use async); reactive txn ordering relies on subscribe order
Constraint: Lettuce sync pipelining must use the async API + RedisFuture — sync commands block per reply and cannot be batched
Directive: do not "simplify" the reactive multi()/exec() nested subscribe() calls — command-to-transaction ordering depends on single-connection subscription order
Ticket: DOC-6503
…xamples

Applies four fixes from a Codex review of the previous commit. The reactive
pipeline used Flux.concat for the reads, which subscribes to each GET only after
the previous one completes — serialized round-trips, not the batch the prose
claimed; switched to flatMapSequential, which subscribes eagerly (so the reads
pipeline) while preserving result order. The redis-rb WATCH example now captures
the block result and branches on the nil abort that the page describes, instead
of only showing the happy path. The Predis exception hierarchy gains an ellipsis
for its omitted types, matching the Lettuce and redis-rb pages. And the Lettuce
retry snippet now restores interrupt status on InterruptedException, matching the
jedis sibling. Re-verified lettuce-reactive and redis-rb against a live Redis via
the example-test-harness.

Directive: reactive pipeline reads use flatMapSequential (eager + ordered) — do not revert to Flux.concat, which serializes the round-trips and defeats the pipelining it demonstrates
Ticket: DOC-6503
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

DOC-6503

@andy-stark-redis andy-stark-redis self-assigned this Jul 17, 2026
@andy-stark-redis andy-stark-redis added the clients Client library docs label Jul 17, 2026
@andy-stark-redis
andy-stark-redis requested a review from a team July 17, 2026 15:38

@dwdougherty dwdougherty 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.

I reviewed the prose, but I didn't scrutinize the code. Approved.

@andy-stark-redis

Copy link
Copy Markdown
Contributor Author

Thanks @dwdougherty !

@andy-stark-redis

Copy link
Copy Markdown
Contributor Author

I reviewed the prose, but I didn't scrutinize the code. Approved.

Great! Please can you also click the Approve button, though :-)

@dwdougherty dwdougherty 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.

LGTM.

@andy-stark-redis
andy-stark-redis merged commit 8c77aee into main Jul 20, 2026
78 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-6503-err-trans-pipes branch July 20, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients Client library docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants