Skip to content

Allow RedisConnectionFactories to be initialized as part of the context lifecycle #2866

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
christophstrobl opened this issue Mar 12, 2024 · 0 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@christophstrobl
Copy link
Member

In the current arrangement the RedisConnectionFactory implementations are implementing both, InitializingBean and SmartLifecycle (See also #2502). Though, for historic reasons they eagerly try to connect to the Redis server already in afterPropertiesSet() which is not in line with the actual intent of the method aiming to verify properties leaving the startup to Lifecycle#start().

For Checkpoint restore and CDS training runs we'd need to move this arrangement into its desired state without breaking existing applications potentially relying on the eager initialization of the connection factory.

@christophstrobl christophstrobl added the type: enhancement A general enhancement label Mar 12, 2024
@mp911de mp911de self-assigned this Mar 13, 2024
@mp911de mp911de changed the title Allow RedisConnectionFactories to be intialized as part of the context lifecycle. Allow RedisConnectionFactories to be intialized as part of the context lifecycle Mar 13, 2024
@mp911de mp911de changed the title Allow RedisConnectionFactories to be intialized as part of the context lifecycle Allow RedisConnectionFactories to be initialized as part of the context lifecycle Mar 13, 2024
mp911de added a commit that referenced this issue Mar 13, 2024
…xt lifecycle.

Lettuce and Jedis connection factories now can be configure to initialize early during afterPropertiesSet or configured whether the component should be auto-started by the container.

By default, connection factories auto-startup early.

Closes #2866
mp911de added a commit that referenced this issue Mar 13, 2024
…xt lifecycle.

Lettuce and Jedis connection factories now can be configured to initialize early during afterPropertiesSet or configured whether the component should be auto-started by the container.

By default, connection factories auto-startup early.

Closes #2866
@christophstrobl christophstrobl added this to the 3.3 RC1 (2024.0.0) milestone Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
2 participants