Caching files always in `use_file`
What does this MR do?
This MR solves the conflicts by use_file
between
- The artifacts browser
ObjectStorage#migrate!
-
UpdatePagesService#extract_zip_archive!
.
https://gitlab.com/gitlab-org/gitlab-ce/issues/48117#note_86769157
I think the solution is
use_file
should not be in the exclusive lease. It always reads the existing file regardless of the file store (i.e.migrate!
process).- Once we fire
use_file
, we always make a clone (cache) of the original file and remove the cache after the READ operation is done. This prevents the process ofmigrate!
removes the original file and disturbs READing.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a Backend maintainer
-
-
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Edited by Shinya Maeda