- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for newNSLock (0.07 sec)
-
cmd/namespace-lock.go
return l.ctx } // Cancel function calls cancel() function func (l LockContext) Cancel() { if l.cancel != nil { l.cancel() } } // newNSLock - return a new name space lock map. func newNSLock(isDistErasure bool) *nsLockMap { nsMutex := nsLockMap{ isDistErasure: isDistErasure, } if isDistErasure { return &nsMutex } nsMutex.lockMap = make(map[string]*nsLock)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0) -
cmd/erasure-server-pool.go
}) // Reset for the next interval timer.Reset(globalAPIConfig.getStaleUploadsCleanupInterval()) } } } func (z *erasureServerPools) NewNSLock(bucket string, objects ...string) RWLocker { return z.serverPools[0].NewNSLock(bucket, objects...) } // GetDisksID will return disks by their ID. func (z *erasureServerPools) GetDisksID(ids ...string) []StorageAPI { idMap := make(map[string]struct{})
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/erasure.go
// some may be local and some remote. getEndpointStrings func() []string // Locker mutex map. nsMutex *nsLockMap } // NewNSLock - initialize a new namespace RWLocker instance. func (er erasureObjects) NewNSLock(bucket string, objects ...string) RWLocker { return er.nsMutex.NewNSLock(er.getLockers, bucket, objects...) } // Shutdown function for object storage interface.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 22:23:33 UTC 2024 - 16.1K bytes - Viewed (0) -
cmd/callhome.go
duration = time.Second } time.Sleep(duration) } }() } 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
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/shared-lock.go
}) type sharedLock struct { 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
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/namespace-lock_test.go
} } // Test lock race func TestNSLockRace(t *testing.T) { t.Skip("long test skip it") ctx := context.Background() for i := 0; i < 10000; i++ { nsLk := newNSLock(false) // lk1; ref=1 if !nsLk.lock(ctx, "volume", "path", "source", "opsID", false, time.Second) { t.Fatal("failed to acquire lock") } // lk2 lk2ch := make(chan struct{}) go func() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 3.1K bytes - Viewed (0) -
cmd/erasure-object.go
} // This call shouldn't be used for anything other than metadata updates or adding self referential versions. 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) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 78.8K bytes - Viewed (0) -
cmd/erasure-sets.go
Pool: set.poolIndex + 1, Set: set.setIndex + 1, } logger.GetReqInfo(ctx).AppendTags(api, op.String()) } // NewNSLock - initialize a new namespace RWLocker instance. func (s *erasureSets) NewNSLock(bucket string, objects ...string) RWLocker { return s.sets[0].NewNSLock(bucket, objects...) } // SetDriveCount returns the current drives per set. func (s *erasureSets) SetDriveCount() int {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 27 10:41:37 UTC 2024 - 37K bytes - Viewed (1) -
cmd/erasure-multipart.go
func (er erasureObjects) newMultipartUpload(ctx context.Context, bucket string, object string, opts ObjectOptions) (*NewMultipartUploadResult, error) { if opts.CheckPrecondFn != nil { if !opts.NoLock { ns := er.NewNSLock(bucket, object) lkctx, err := ns.GetLock(ctx, globalOperationTimeout) if err != nil { return nil, err } ctx = lkctx.Context() defer ns.Unlock(lkctx) opts.NoLock = true }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 44.7K bytes - Viewed (0) -
cmd/admin-handlers.go
return } if !globalSiteReplicationSys.isEnabled() { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrNotImplemented), r.URL) return } nsLock := objectAPI.NewNSLock(minioMetaBucket, "site-net-perf") lkctx, err := nsLock.GetLock(ctx, globalOperationTimeout) if err != nil { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(toAPIErrorCode(ctx, err)), r.URL) return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 11:32:32 UTC 2024 - 99.7K bytes - Viewed (0)