Skip to content

ObjectStorage#use_file should respect exclusive lease

Alessio Caiazza requested to merge ac/fix-use_file-race into master

What does this MR do?

We claim exclusive lease on uploads while moving from different storages but we don't check such lease in ObjecStorage#use_file.

This may lead to data races like those described in gitlab-com/infrastructure#3874

This MR extends Gitlab::ExclusiveLease to ObjecStorage#use_file.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

See gitlab-com/infrastructure#3874

Screenshots (if relevant)

retry

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

  • closes gitlab-com/infrastructure#3874
  • gitlab-org/gitlab-ce#43641
  • gitlab-com/support-forum#3079
Edited by Alessio Caiazza

Merge request reports