Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for GetLock (0.2 sec)

  1. 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 {
    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)
  2. cmd/erasure-multipart.go

    	// streamto avoid any concurrent updates.
    	//
    	// Must be held throughout this call.
    	partIDLock := er.NewNSLock(bucket, pathJoin(object, uploadID, strconv.Itoa(partID)))
    	plkctx, err := partIDLock.GetLock(ctx, globalOperationTimeout)
    	if err != nil {
    		return PartInfo{}, err
    	}
    	pctx := plkctx.Context()
    	defer partIDLock.Unlock(plkctx)
    
    	onlineDisks := er.getDisks()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 43K bytes
    - Viewed (0)
  3. 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()
    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)
  4. cmd/erasure-server-pool-rebalance.go

    			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))
    			return err
    		}
    		defer lock.Unlock(lkCtx)
    
    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)
  5. cmd/erasure-healing.go

    		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)
    	}
    
    	// Re-read when we have lock...
    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)
  6. cmd/admin-handlers.go

    		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
    	}
    	ctx = lkctx.Context()
    	defer nsLock.Unlock(lkctx)
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 29 17:39:04 GMT 2024
    - 97.8K bytes
    - Viewed (2)
  7. cmd/bucket-replication.go

    	}
    
    	// Lock the object name before starting replication operation.
    	// Use separate lock that doesn't collide with regular objects.
    	lk := objectAPI.NewNSLock(bucket, "/[replicate]/"+dobj.ObjectName)
    	lkctx, err := lk.GetLock(ctx, globalOperationTimeout)
    	if err != nil {
    		globalReplicationPool.queueMRFSave(dobj.ToMRFEntry())
    		sendEvent(eventArgs{
    			BucketName: bucket,
    			Object: ObjectInfo{
    				Bucket:       bucket,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 112.2K bytes
    - Viewed (1)
  8. cmd/data-scanner.go

    // The function will block until the context is canceled.
    // There should only ever be one scanner running per cluster.
    func runDataScanner(ctx context.Context, objAPI ObjectLayer) {
    	ctx, cancel := globalLeaderLock.GetLock(ctx)
    	defer cancel()
    
    	// Load current bloom cycle
    	var cycleInfo currentScannerCycle
    
    	buf, _ := readConfig(ctx, objAPI, dataUsageBloomNamePath)
    	if len(buf) == 8 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 11:18:58 GMT 2024
    - 47.6K bytes
    - Viewed (0)
  9. cmd/site-replication.go

    		}
    	}
    	return nil
    }
    
    const siteHealTimeInterval = 30 * time.Second
    
    func (c *SiteReplicationSys) startHealRoutine(ctx context.Context, objAPI ObjectLayer) {
    	ctx, cancel := globalLeaderLock.GetLock(ctx)
    	defer cancel()
    
    	healTimer := time.NewTimer(siteHealTimeInterval)
    	defer healTimer.Stop()
    
    	var maxRefreshDurationSecondsForLog float64 = 10 // 10 seconds..
    
    	for {
    		select {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 184.2K bytes
    - Viewed (1)
Back to top