Closed hackartisan closed 7 years ago
I believe this is caused by saving a work via its file manager before the background job adding the files to the work has completed.
This should not be possible due to locking.
I suspect the locks aren't being held long enough (note: a lock is released at the end of the block)
more analysis needed.
also related:
This error is a side effect of #316
This is an error in the job that creates the notification ("File X was attached to work Y"). This error occurs when the attach job ran, then the relationship was erased by a form save overwriting the work data, then the job to create the notification of the attachment ran. At that point the notification job asks the fileset who its parent is, but that relationship is gone so it gets nil.
However, you don't always get this error when a relationship has been overwritten. If the notification is created before the relationship is wiped then this job doesn't error out.
Closing in favor it #316