Hyrax: CreateWithRemoteFilesOrderedMembersActor isn't thread safe

Created on 28 Mar 2019  路  4Comments  路  Source: samvera/hyrax

Descriptive summary

Since ActionDispatch::MiddlewareStack reuses specific middlewares from a pool at runtime, individual middlewares (such as actors) should not count on having mutable instance variables. In this case, that manifested through the @ordered_members accumulator on the CreateWithRemoteFilesOrderedMembersActor actor, which ended up with a jumble of unrelated file sets under heavy ingest load (such as a batch ingest operation).

bug

Most helpful comment

I'm tempted to fix this issue by dropping ActionDispatch::MiddlewareStack. We're really only using it to provide us a stack, and there's no reason we need this pooling, or other MiddlewareStack features.

All 4 comments

  • Initially fixed by #3477
  • Referenced by #3549 and #3703

I'm tempted to fix this issue by dropping ActionDispatch::MiddlewareStack. We're really only using it to provide us a stack, and there's no reason we need this pooling, or other MiddlewareStack features.

I support this plan.

This is work that could be done but is not something the Hyrax Maintenance WG is going to undertake. Valkyrie will be offering improvements for Fedora users so if this is something that is needed in the meantime, it is an open issue that someone in the community can take.

Was this page helpful?
0 / 5 - 0 ratings