• Alex Kalderimis's avatar
    Add distributed lock around design management mutations · 82b9cf7b
    Alex Kalderimis authored
    This adds a distributed lock managed in Redis around all new
    design management version creations, in order to prevent concurrent
    commits to master in the design repository for each project.
    
    The lock is acquired scoped to the project ID, meaning different
    projects can take different locks concurrently, but design
    uploads/deletions in the same repository block each other. Each mutation
    is given 5 seconds of exclusive lock time to run, and an exponential
    back-off is used to handle backpressure.
    
    ExclusiveLeaseHelpers is modified to support exponential back-off
    82b9cf7b
exclusive_lease_helpers.rb 1.34 KB