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

Rescue from search indexer errors #495

Open
cavis opened this issue Dec 19, 2018 · 1 comment
Open

Rescue from search indexer errors #495

cavis opened this issue Dec 19, 2018 · 1 comment
Labels

Comments

@cavis
Copy link
Member

cavis commented Dec 19, 2018

There are still instances where the search indexer/deindexer jobs throw errors. Like when you create a new series then immediately delete it.

The delete job fails with an ES error:

Elasticsearch::Transport::Transport::Errors::NotFound: [404] {"_index":"series","_type":"series","_id":"38557","_version":1,"result":"not_found","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":485636,"_primary_term":1}

…rt-6.1.0/lib/elasticsearch/transport/transport/base.rb: 205:in `__raise_transport_error'
…rt-6.1.0/lib/elasticsearch/transport/transport/base.rb: 323:in `perform_request'
…/lib/elasticsearch/transport/transport/http/faraday.rb:  20:in `perform_request'
…-transport-6.1.0/lib/elasticsearch/transport/client.rb: 131:in `perform_request'
…arch-api-6.1.0/lib/elasticsearch/api/actions/delete.rb:  57:in `delete'
…search-model-5.0.0/lib/elasticsearch/model/indexing.rb: 362:in `delete_document'
/app/app/models/concerns/searchable.rb:  47:in `remove_from_index'
/app/app/jobs/search_deindexer_job.rb:   8:in `perform'

And the create job fails with a global_id error:

ActiveRecord::RecordNotFound: Couldn't find Series with 'id'=38557

…rd-4.2.10/lib/active_record/relation/finder_methods.rb: 324:in `raise_record_not_found_exception!'
…rd-4.2.10/lib/active_record/relation/finder_methods.rb: 444:in `find_one'
…rd-4.2.10/lib/active_record/relation/finder_methods.rb: 423:in `find_with_ids'
…rd-4.2.10/lib/active_record/relation/finder_methods.rb:  71:in `find'
…gems/activerecord-4.2.10/lib/active_record/querying.rb:   3:in `find'
…dle/gems/activerecord-4.2.10/lib/active_record/core.rb: 131:in `find'
…al/bundle/gems/globalid-0.4.1/lib/global_id/locator.rb: 130:in `locate'
…al/bundle/gems/globalid-0.4.1/lib/global_id/locator.rb: 155:in `block in locate'
…al/bundle/gems/globalid-0.4.1/lib/global_id/locator.rb: 165:in `block in unscoped'
…tiverecord-4.2.10/lib/active_record/scoping/default.rb:  33:in `block in unscoped'
…gems/activerecord-4.2.10/lib/active_record/relation.rb: 302:in `scoping'
…tiverecord-4.2.10/lib/active_record/scoping/default.rb:  33:in `unscoped'
…al/bundle/gems/globalid-0.4.1/lib/global_id/locator.rb: 165:in `unscoped'
…al/bundle/gems/globalid-0.4.1/lib/global_id/locator.rb: 155:in `locate'
…al/bundle/gems/globalid-0.4.1/lib/global_id/locator.rb:  17:in `locate'
…ndle/gems/activejob-4.2.10/lib/active_job/arguments.rb:  99:in `deserialize_global_id'
…ndle/gems/activejob-4.2.10/lib/active_job/arguments.rb:  85:in `deserialize_argument'
…ndle/gems/activejob-4.2.10/lib/active_job/arguments.rb:  42:in `block in deserialize'
…ndle/gems/activejob-4.2.10/lib/active_job/arguments.rb:  42:in `map'
…ndle/gems/activejob-4.2.10/lib/active_job/arguments.rb:  42:in `deserialize'
…al/bundle/gems/activejob-4.2.10/lib/active_job/core.rb:  90:in `deserialize_arguments'
…al/bundle/gems/activejob-4.2.10/lib/active_job/core.rb:  80:in `deserialize_arguments_if_needed'
…ndle/gems/activejob-4.2.10/lib/active_job/execution.rb:  30:in `perform_now'
…ndle/gems/activejob-4.2.10/lib/active_job/execution.rb:  21:in `execute'
…-2.0.11/lib/shoryuken/extensions/active_job_adapter.rb:  78:in `perform'
…undle/gems/shoryuken-2.0.11/lib/shoryuken/processor.rb:  22:in `block in process'
@cavis
Copy link
Member Author

cavis commented Jan 4, 2019

Ideas:

  • Encode the class name / id manually into the global id, instead of letting it serialize the model. Then do the lookup manually.
  • Fix error handling on global id stuff upstream

@cavis cavis added the low label Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant