samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
184 stars 124 forks source link

All Thumbnail Loads ("Downloads") Hit Fedora #6153

Open conorom opened 1 year ago

conorom commented 1 year ago

Descriptive summary

This work to fix a permission bug related to Workflow has meant that now every thumbnail that is accessed hits Fedora to (presumably) check on the Workflow stuff.

This is a massive performance problem, so I'm marking it a bug.

Steps to reproduce the behavior in User Interface (UI)

Access a thumbnail URL with Fedora not running. You can now when you could before. The performance hit is pretty bad when you have multiple bots slurping content with 100 thumbnails on each results page.

Actual behavior (include screenshots if available)

main, 3.5+ plus whatever releases may have backported that PR. Need to check.

Acceptance Criteria/Expected Behavior

You can access a thumbnail URL with Fedora not running.

Related work

https://github.com/samvera/hyrax/pull/5921

conorom commented 1 year ago

For anyone that can't deal with the performance hit until this is fixed, reverting Hyrax::DownloadsController.authorize_download! to the way it was before the linked PR is the way to go.