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

DEPRECATION: Rsolr.new/connect option 'read_timeout' is deprecated and will be removed in Rsolr 3. #1018

Open
rocket-turtle opened this issue Jul 8, 2022 · 0 comments

Comments

@rocket-turtle
Copy link
Contributor

DEPRECATION: Rsolr.new/connect option 'read_timeout' is deprecated and will be removed in Rsolr 3. 'timeout' is currently a synonym, use that instead.

https://github.com/rsolr/rsolr/blob/v2.5.0/lib/rsolr/client.rb#L39

if options[:read_timeout]
  warn "DEPRECATION: Rsolr.new/connect option `read_timeout` is deprecated and will be removed in Rsolr 3. `timeout` is currently a synonym, use that instead."
end

We set the timeout like this: Sunspot.session.config.solr.read_timeout = 2

I tried to change it to: Sunspot.session.config.solr.timeout = 2

This leads to the error:

NoMethodError:
  undefined method `timeout=' for #<LightConfig::Configuration:0x00007f8134c3c618>

The read_timeout for the LightConfig::Configuration is defined here:
https://github.com/sunspot/sunspot/blob/v2.6.0/sunspot/lib/sunspot/configuration.rb#L26

Quick fix would be to change the connection config in
https://github.com/sunspot/sunspot/blob/v2.6.0/sunspot/lib/sunspot/session.rb#L259

Please let me know if you think there are any other side effects. read_timeout is used quit often.
https://github.com/sunspot/sunspot/pull/1017/files

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

No branches or pull requests

1 participant