Skip to content

Update "Pipelines and transactions" doc example to include pipeline.close() #4134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 7, 2025

Conversation

ggivo
Copy link
Collaborator

@ggivo ggivo commented Apr 5, 2025

The example PipeTransExample.java is updated to use a try-with-resources block to ensure the pipeline is properly closed after use.

Failing to close pipelines can lead to resource leaks. Specifically, if pipelines are repeatedly created without being closed, and the number of open connections exceeds the maximum allowed by the connection pool, the application will block.

closes #4132

@ggivo ggivo requested review from uglide and atakavci April 5, 2025 20:13
@ggivo ggivo self-assigned this Apr 5, 2025
@ggivo ggivo added documentation skip-changelog Ignore pull request from release note docs-review labels Apr 5, 2025
@ggivo ggivo added this to the 6.0.0 milestone Apr 5, 2025
Copy link
Contributor

@andy-stark-redis andy-stark-redis left a comment

Choose a reason for hiding this comment

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

I've tested this with a doc build and the example looks fine. Just a minor suggestion but otherwise LGTM.

Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com>
@ggivo ggivo merged commit 582df92 into redis:master Apr 7, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-review documentation skip-changelog Ignore pull request from release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update "Pipelines and transactions" doc example to include pipeline.close()
2 participants