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

ElasticSearch install fails on status_preloadable_poll #11887

Closed
dariusk opened this issue Sep 18, 2019 · 2 comments
Closed

ElasticSearch install fails on status_preloadable_poll #11887

dariusk opened this issue Sep 18, 2019 · 2 comments

Comments

@dariusk
Copy link
Contributor

dariusk commented Sep 18, 2019

Expected behaviour

Running chewy:upgrade should successfully update indexes.

Actual behaviour

Crashes after about an hour,

$ time RAILS_ENV=production bundle exec rake chewy:upgrade
Resetting StatusesIndex
  Imported StatusesIndex::Status in 1h 2m 58s, stats:
rake aborted!
NameError: undefined local variable or method `status_preloadable_poll' for StatusesIndex::Status:Class
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/search.rb:78:in `method_missing'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type.rb:92:in `method_missing'
/home/mastodon/live/app/chewy/statuses_index.rb:54:in `block (3 levels) in <class:StatusesIndex>'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/fields/base.rb:71:in `evaluate'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/fields/base.rb:47:in `compose'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/fields/root.rb:85:in `block in compose'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/fields/root.rb:84:in `each'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/fields/root.rb:84:in `each_with_object'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/fields/root.rb:84:in `compose'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import.rb:122:in `compose'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import/bulk_builder.rb:77:in `index_entry'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import/bulk_builder.rb:27:in `each'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import/bulk_builder.rb:27:in `flat_map'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import/bulk_builder.rb:27:in `bulk_body'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import/routine.rb:81:in `process'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import.rb:143:in `block (2 levels) in import_lin
ear'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/adapter/active_record.rb:32:in `block in import_
scope'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/adapter/active_record.rb:70:in `pluck_in_batches
'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/adapter/active_record.rb:25:in `each'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/adapter/active_record.rb:25:in `inject'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/adapter/active_record.rb:25:in `import_scope'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/adapter/orm.rb:79:in `import'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import.rb:142:in `block in import_linear'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `block in in
strument'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb:23:in
`instrument'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `instrument'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import.rb:141:in `import_linear'

/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import.rb:136:in `import_routine'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/type/import.rb:76:in `import'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/index/actions.rb:149:in `block in import'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/index/actions.rb:147:in `map'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/index/actions.rb:147:in `import'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/index/actions.rb:182:in `reset!'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/rake_helper.rb:299:in `reset_one'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/rake_helper.rb:73:in `block (2 levels) in upgrade'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/rake_helper.rb:71:in `each'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/rake_helper.rb:71:in `block in upgrade'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/rake_helper.rb:220:in `block (2 levels) in subscribed_task_stats'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:180:in `subscribed'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/rake_helper.rb:219:in `block in subscribed_task_stats'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:180:in `subscribed'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/rake_helper.rb:218:in `subscribed_task_stats'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/chewy/rake_helper.rb:63:in `upgrade'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.0.0/lib/tasks/chewy.rake:31:in `block (2 levels) in <top (required)>'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/mastodon/.rbenv/versions/2.6.1/bin/bundle:30:in `block in <main>'
/home/mastodon/.rbenv/versions/2.6.1/bin/bundle:22:in `<main>'
Tasks: TOP => chewy:upgrade
(See full trace by running task with --trace)
RAILS_ENV=production bundle exec rake chewy:upgrade  3186.96s user 14.82s system 84% cpu 1:03:03.12 total

Steps to reproduce the problem

This is while installing ElasticSearch per the instructions on the Mastodon docs. I'm on Ubuntu 18.04.

Specifications

I'm encountering this in 2.9.3, and I believe the relevant commit is f1bc90a

Also I'm unsure if this is even a problem. It might be safe for me to go ahead and do the rest of the steps, since it does say the indexes were updated, but the crash gives me pause.

@noellabo
Copy link
Contributor

This issue is due to the mistake of status_preloadable_poll and status.preloadable_poll, which has been fixed in #11192 .

If the relevant part of the source code has been corrected correctly, try deleting the rails cache just in case. bin/tootctl cache clear

@dariusk
Copy link
Contributor Author

dariusk commented Sep 20, 2019

This has fixed this problem for me, thanks. I had to cherry-pick 1357bf6 and then run bin/tootctl cache clear. I'm now in ElasticSearch configuration hell but at least it's a hell of my own making :)

@dariusk dariusk closed this as completed Sep 20, 2019
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

2 participants