distribution/registry/storage/driver/base
Oleg Bulatov 258345ba0d Fix signalling Wait in regulator.enter
In some conditions, regulator.exit may not send a signal to blocked
regulator.enter.

Let's assume we are in the critical section of regulator.exit and r.available
is equal to 0. And there are three more gorotines. One goroutine also executes
regulator.exit and waits for the lock. Rest run regulator.enter and wait for
the signal.

We send the signal, and after releasing the lock, there will be lock
contention:

  1. Wait from regulator.enter
  2. Lock from regulator.exit

If the winner is Lock from regulator.exit, we will not send another signal to
unlock the second Wait.

Signed-off-by: Oleg Bulatov <obulatov@redhat.com>
2017-06-02 15:41:55 +02:00
..
base.go Use app.driver.Stat for registry health check 2016-12-21 17:12:43 -08:00
regulator.go Fix signalling Wait in regulator.enter 2017-06-02 15:41:55 +02:00
regulator_test.go Fix signalling Wait in regulator.enter 2017-06-02 15:41:55 +02:00