fix: add lock ownership to expire locks (#10571)

- Add owner information for expiry, locking, unlocking a resource
- TopLocks returns now locks in quorum by default, provides
  a way to capture stale locks as well with `?stale=true`
- Simplify the quorum handling for locks to avoid from storage
  class, because there were challenges to make it consistent
  across all situations.
- And other tiny simplifications to reset locks.
This commit is contained in:
Harshavardhana
2020-09-25 19:21:52 -07:00
committed by GitHub
parent 66b4a862e0
commit eafa775952
16 changed files with 207 additions and 174 deletions

View File

@@ -31,6 +31,7 @@ import (
"testing"
"time"
"github.com/google/uuid"
. "github.com/minio/minio/pkg/dsync"
)
@@ -78,7 +79,7 @@ func TestMain(m *testing.M) {
}
ds = &Dsync{
GetLockersFn: func() []NetLocker { return clnts },
GetLockers: func() ([]NetLocker, string) { return clnts, uuid.New().String() },
}
startRPCServers(nodes)