- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for GetLock (0.28 sec)
-
internal/dsync/dsync_test.go
} dm := NewDRWMutex(ds, "aap") dm.refreshInterval = testDrwMutexRefreshInterval ctx, cancel := context.WithCancel(context.Background()) if !dm.GetLock(ctx, cancel, id, source, Options{Timeout: 5 * time.Minute}) { t.Fatal("GetLock() should be successful") } // Make it run twice. timer := time.NewTimer(testDrwMutexRefreshInterval * 2) select { case <-ctx.Done():
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 19 14:35:19 UTC 2024 - 11.1K bytes - Viewed (0) -
cmd/namespace-lock.go
opsID string } // Lock - block until write lock is taken or timeout has occurred. func (di *distLockInstance) GetLock(ctx context.Context, timeout *dynamicTimeout) (LockContext, error) { lockSource := getSource(2) start := UTCNow() newCtx, cancel := context.WithCancel(ctx) if !di.rwMutex.GetLock(newCtx, cancel, di.opsID, lockSource, dsync.Options{ Timeout: timeout.Timeout(), RetryInterval: timeout.RetryInterval(),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
}() drwm3 := NewDRWMutex(ds, "simplelock") // fmt.Println("Trying to acquire write lock, waiting...") ctx3, cancel3 := context.WithCancel(context.Background()) locked = drwm3.GetLock(ctx3, cancel3, id, source, Options{Timeout: duration}) if locked { // fmt.Println("Write lock acquired, waiting...") time.Sleep(testDrwMutexAcquireTimeout) drwm3.Unlock(context.Background()) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
// fmt.Println("Getting initial write lock") if !lrwm.GetLock(ctx, "", "", time.Second) { panic("Failed to acquire initial write lock") } go func() { time.Sleep(2 * time.Second) lrwm.Unlock() // fmt.Println("Initial write lock released, waiting...") }() // fmt.Println("Trying to acquire 2nd write lock, waiting...") locked = lrwm.GetLock(ctx, "", "", duration) if locked {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K bytes - Viewed (0) -
cmd/shared-lock.go
lockContext chan LockContext } func (ld sharedLock) backgroundRoutine(ctx context.Context, objAPI ObjectLayer, lockName string) { for { locker := objAPI.NewNSLock(minioMetaBucket, lockName) lkctx, err := locker.GetLock(ctx, sharedLockTimeout) if err != nil { continue } keepLock: for { select { case <-ctx.Done(): return case <-lkctx.Context().Done():
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 13 09:26:38 UTC 2023 - 2.3K bytes - Viewed (0) -
cmd/erasure-server-pool.go
return BucketNameInvalid{Bucket: bucket} } if !opts.NoLock { // Lock the bucket name before creating. lk := z.NewNSLock(minioMetaTmpBucket, bucket+".lck") lkctx, err := lk.GetLock(ctx, globalOperationTimeout) if err != nil { return err } ctx = lkctx.Context() defer lk.Unlock(lkctx) } } if err := z.s3Peer.MakeBucket(ctx, bucket, opts); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 89.8K bytes - Viewed (0) -
cmd/callhome.go
} func runCallhome(ctx context.Context, objAPI ObjectLayer) bool { // Make sure only 1 callhome is running on the cluster. locker := objAPI.NewNSLock(minioMetaBucket, "callhome/runCallhome.lock") lkctx, err := locker.GetLock(ctx, callhomeLeaderLockTimeout) if err != nil { // lock timedout means some other node is the leader, // cycle back return 'true' return true } ctx = lkctx.Context() defer locker.Unlock(lkctx)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 17 16:53:34 UTC 2024 - 5.3K bytes - Viewed (0) -
cmd/erasure-multipart.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 44.7K bytes - Viewed (0) -
internal/dsync/drwmutex.go
Timeout time.Duration RetryInterval time.Duration } // GetLock tries to get a write lock on dm before the timeout elapses. // // If the lock is already in use, the calling go routine // blocks until either the mutex becomes available and return success or // more time has passed than the timeout value and return false.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 15:49:49 UTC 2024 - 20.4K bytes - Viewed (0) -
cmd/erasure-object.go
if !srcInfo.metadataOnly { return oi, NotImplemented{} } if !dstOpts.NoLock { lk := er.NewNSLock(dstBucket, dstObject) lkctx, err := lk.GetLock(ctx, globalOperationTimeout) if err != nil { return oi, err } ctx = lkctx.Context() defer lk.Unlock(lkctx) } // Read metadata associated with the object from all disks. storageDisks := er.getDisks()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 78.8K bytes - Viewed (0)