Skip to content

Caching files always in `use_file`

Shinya Maeda requested to merge caching-file-in-use-file-always-ce into master

What does this MR do?

This MR solves the conflicts by use_file between

  1. The artifacts browser
  2. ObjectStorage#migrate!
  3. 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 of migrate! 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?

Close https://gitlab.com/gitlab-org/gitlab-ce/issues/48117

Edited by Shinya Maeda

Merge request reports