Skip to content
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

fix #2974 -- use redis::aio::ConnectionManager #2976

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

fibonacci1729
Copy link
Contributor

@fibonacci1729 fibonacci1729 commented Jan 9, 2025

Fixes #2974

This replaces the use of redis::aio::MultiplexedConnection with redis::aio::ConnectionManager which automatically attempts to retry connecting upon error. See this for behavior of ConnectionManager. To handle not passing on the first error to the user as described by "When a command sent to the server fails with an error that represents a “connection dropped” condition, that error will be passed on to the user..." relevant implementations of Store now implement after_open() which will to try ping the connection to trigger the automatic retry.

Copy link
Contributor

@dicej dicej left a comment

Choose a reason for hiding this comment

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

LGTM. It's a little weird that we have to clone the ConnectionManager to call any redis::Commands methods, but I guess it makes more sense than adding a layer of Arc<Mutex<...>> on top of it.

crates/key-value-redis/src/store.rs Outdated Show resolved Hide resolved
crates/key-value-redis/src/store.rs Outdated Show resolved Hide resolved
crates/key-value-redis/src/store.rs Show resolved Hide resolved
Copy link
Contributor

@itowlson itowlson left a comment

Choose a reason for hiding this comment

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

did I mention :shipit:

@fibonacci1729 fibonacci1729 merged commit e8edf4d into fermyon:main Jan 10, 2025
17 checks passed
@fibonacci1729 fibonacci1729 deleted the fix-2974 branch January 10, 2025 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

io error: broken pipe when accessing redis-backed KV store
3 participants