Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for NewNSLock (0.23 sec)

  1. cmd/erasure-multipart.go

    func (er erasureObjects) newMultipartUpload(ctx context.Context, bucket string, object string, opts ObjectOptions) (*NewMultipartUploadResult, error) {
    	if opts.CheckPrecondFn != nil {
    		// Lock the object before reading.
    		lk := er.NewNSLock(bucket, object)
    		lkctx, err := lk.GetRLock(ctx, globalOperationTimeout)
    		if err != nil {
    			return nil, err
    		}
    		rctx := lkctx.Context()
    		obj, err := er.getObjectInfo(rctx, bucket, object, opts)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 43K bytes
    - Viewed (0)
  2. cmd/erasure-server-pool.go

    		break
    	}
    
    	return z, nil
    }
    
    func (z *erasureServerPools) NewNSLock(bucket string, objects ...string) RWLocker {
    	poolID := hashKey(z.distributionAlgo, "", len(z.serverPools), z.deploymentID)
    	if len(objects) >= 1 {
    		poolID = hashKey(z.distributionAlgo, objects[0], len(z.serverPools), z.deploymentID)
    	}
    	return z.serverPools[poolID].NewNSLock(bucket, objects...)
    }
    
    // GetDisksID will return disks by their ID.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  3. 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.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 16K bytes
    - Viewed (1)
  4. 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
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.1K bytes
    - Viewed (1)
  5. cmd/erasure-sets.go

    	}
    
    	logger.GetReqInfo(ctx).AppendTags("objectLocation", op)
    }
    
    // NewNSLock - initialize a new namespace RWLocker instance.
    func (s *erasureSets) NewNSLock(bucket string, objects ...string) RWLocker {
    	if len(objects) == 1 {
    		return s.getHashedSet(objects[0]).NewNSLock(bucket, objects...)
    	}
    	return s.getHashedSet("").NewNSLock(bucket, objects...)
    }
    
    // SetDriveCount returns the current drives per set.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 37.7K bytes
    - Viewed (5)
  6. 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)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 77.2K bytes
    - Viewed (2)
  7. cmd/erasure-server-pool-rebalance.go

    			// its a new pool that can receive rebalanced data.
    			z.rebalMeta.PoolStats = append(z.rebalMeta.PoolStats, &rebalanceStats{})
    			ok = true
    		}
    	}
    	if ok {
    		lock := z.serverPools[0].NewNSLock(minioMetaBucket, rebalMetaName)
    		lkCtx, err := lock.GetLock(ctx, globalOperationTimeout)
    		if err != nil {
    			rebalanceLogIf(ctx, fmt.Errorf("failed to acquire write lock on %s/%s: %w", minioMetaBucket, rebalMetaName, err))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  8. cmd/batch-rotate.go

    		return errInvalidEncryptionParameters
    	}
    	versioned := globalBucketVersioningSys.PrefixEnabled(srcBucket, srcObject)
    	versionSuspended := globalBucketVersioningSys.PrefixSuspended(srcBucket, srcObject)
    
    	lock := api.NewNSLock(r.Bucket, objInfo.Name)
    	lkctx, err := lock.GetLock(ctx, globalOperationTimeout)
    	if err != nil {
    		return err
    	}
    	ctx = lkctx.Context()
    	defer lock.Unlock(lkctx)
    
    	opts := ObjectOptions{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  9. cmd/object-api-interface.go

    	o.EvalRetentionBypassFn = f
    }
    
    // ObjectLayer implements primitives for object API layer.
    type ObjectLayer interface {
    	// Locking operations on object.
    	NewNSLock(bucket string, objects ...string) RWLocker
    
    	// Storage operations.
    	Shutdown(context.Context) error
    	NSScanner(ctx context.Context, updates chan<- DataUsageInfo, wantCycle uint32, scanMode madmin.HealScanMode) error
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 17K bytes
    - Viewed (0)
  10. cmd/erasure-healing.go

    		Type:      madmin.HealItemObject,
    		Bucket:    bucket,
    		Object:    object,
    		VersionID: versionID,
    		DiskCount: len(storageDisks),
    	}
    
    	if !opts.NoLock {
    		lk := er.NewNSLock(bucket, object)
    		lkctx, err := lk.GetLock(ctx, globalOperationTimeout)
    		if err != nil {
    			return result, err
    		}
    		ctx = lkctx.Context()
    		defer lk.Unlock(lkctx)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 33.1K bytes
    - Viewed (0)
Back to top