Skip to content

GH-920: Improve pipelining documentation#3381

Open
won-seoop wants to merge 1 commit into
spring-projects:mainfrom
won-seoop:doc-920-improve-pipelining
Open

GH-920: Improve pipelining documentation#3381
won-seoop wants to merge 1 commit into
spring-projects:mainfrom
won-seoop:doc-920-improve-pipelining

Conversation

@won-seoop

Copy link
Copy Markdown

What

Closes #920.

Improves the Redis pipelining reference documentation by addressing the specific gaps raised in the issue.

Changes

Fire-and-forget mode (new section)

The existing docs mentioned execute(callback, true) for "when you don't care about results" but provided no code example. Added an explicit section with a working example.

Terminology: "list" not "queue"

Changed the comment and the Redis key name from myqueue to mylist, consistent with Redis's own documentation for the underlying data type that RPOP/RPUSH operate on.

Mixed-operation example (new example)

Added a second example that pipelines SET, RPUSH, GET, and LRANGE in a single callback and maps each index of the returned List to the command that produced it. This addresses the request to show "various (not just RPOP) operations returning different data types."

doInRedis() return value

Changed the note from a bare requirement ("must be null") to an explanation: the value is discarded because Spring Data Redis uses the pipeline results instead. The example now uses a callout <1> to tie the code to the explanation.

Read results inside the callback

Added a NOTE block explaining that read commands are queued and their results are not available inside the callback — they appear in the returned List after the pipeline is flushed. This prevents the misconception (raised in the issue) that you can branch on a read result within the same pipeline call.

Test plan

  • Review the rendered AsciiDoc to verify callouts, code blocks, and cross-references render correctly.
  • Verify that rPop("mylist") is consistent with Redis list semantics.

🤖 Generated with Claude Code

Addresses the documentation gaps raised in spring-projects#920:

* Add a dedicated section showing the fire-and-forget pattern using the
  standard execute(callback, exposeConnection, pipeline) overload, which
  was mentioned in prose but had no code example.

* Use "list" instead of "queue" throughout, consistent with Redis
  documentation for the underlying data type.

* Replace the single rPop example with two examples: one focused bulk
  rPop and one showing mixed command types (SET, RPUSH, GET, LRANGE) to
  demonstrate that each index in the returned List corresponds to the
  command at that position.

* Clarify that the doInRedis() return value must be null (discarded) by
  explaining why, not just noting the requirement.

* Add a NOTE explaining that read command results are not available inside
  the callback — they only appear in the returned List after the pipeline
  is flushed — to prevent the misconception that you can branch on a
  read result within a single pipeline call.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve pipelining documentation [DATAREDIS-343]

2 participants