scientist-softserv / britishlibrary

Other
3 stars 0 forks source link

šŸ› Add rescue to ReindexFundersJob #441

Closed laritakr closed 1 year ago

laritakr commented 1 year ago

Story

This work gave an indexing error. When an indexing error occurs, the job will retry forever.

In this case, the index for creator_search was indexing the full creator object for 266 creators, which resulted in too long of a string.

This PR attempts to handle the situation in two ways:

Refs #440

Expected Behavior Before Changes

Job retries forever due to errors.

Expected Behavior After Changes

The reindex funders job will complete normally.

Screenshots / Video

Initial error ![Screenshot 2023-05-25 at 11 28 56 AM](https://github.com/scientist-softserv/britishlibrary/assets/17851674/2d003672-807d-4dd3-97d8-10ac3eb02222)
Results after change ### Reindex job completes Rails logging did not capture the expected log of error(s), which is apparently a known issue with Sidekiq. But the job did complete normally. ![Screenshot 2023-05-25 at 3 03 54 PM](https://github.com/scientist-softserv/britishlibrary/assets/17851674/f6082767-1d55-4828-8951-450eed7c933d) ### A record which got a solr error still does not reindex ![Screenshot 2023-05-25 at 3 21 02 PM](https://github.com/scientist-softserv/britishlibrary/assets/17851674/de053e6f-8450-45d3-b6a8-fbd3efe7a6c9)

Notes

The Solr config change did not affect the ability to index the work with the issue. This work cannot be indexed upon save via the UI. This has been reported as a separate bug.