Skip to content

Guard non-initialized RedisConnectionFactory.getConnection() with IllegalStateException #2057

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

Closed
mp911de opened this issue Apr 27, 2021 · 0 comments
Assignees
Labels
type: task A general task

Comments

@mp911de
Copy link
Member

mp911de commented Apr 27, 2021

From #2053 we learned that it is pretty simple to run into a scenario where a connection factory remains unconfigured while obtaining connections works to a certain degree. We should fail early with an IllegalStateException if the connection factory is not fully initialized via afterPropertiesSet to avoid using partially configured clients.

@mp911de mp911de added the type: task A general task label Apr 27, 2021
@mp911de mp911de self-assigned this Apr 27, 2021
@mp911de mp911de added this to the 2.5.1 (2021.0.1) milestone May 12, 2021
mp911de added a commit that referenced this issue May 12, 2021
…egalStateException.

Obtaining a Connection from RedisConnectionFactory and its reactive variant is now guarded by IllegalStateException that is thrown if the connection factory was not yet initialized.

Previously, connections could be obtained where configuration was partially applied.

Closes #2057
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant