Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for MockTr (0.21 sec)

  1. cmd/local-locker.go

    	}
    	return lockCopy
    }
    
    func (l *localLocker) Close() error {
    	return nil
    }
    
    // IsOnline - local locker is always online.
    func (l *localLocker) IsOnline() bool {
    	return true
    }
    
    // IsLocal - local locker returns true.
    func (l *localLocker) IsLocal() bool {
    	return true
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  2. internal/dsync/drwmutex.go

    	locks := make([]string, len(restClnts))
    
    	// Add total timeout
    	ctx, cancel := context.WithTimeout(ctx, opts.Timeout)
    	defer cancel()
    
    	// Tolerance is not set, defaults to half of the locker clients.
    	tolerance := len(restClnts) / 2
    
    	// Quorum is effectively = total clients subtracted with tolerance limit
    	quorum := len(restClnts) - tolerance
    	if !isReadLock {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  3. cmd/erasure.go

    	getEndpoints func() []Endpoint
    
    	// getEndpoints returns list of endpoint strings belonging this set.
    	// 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 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 16K bytes
    - Viewed (1)
  4. cmd/admin-handlers.go

    			continue
    		}
    		args.Resources = append(args.Resources, path)
    	}
    
    	for _, lks := range z.serverPools[0].erasureLockers {
    		lockers = append(lockers, lks...)
    	}
    
    	for _, locker := range lockers {
    		locker.ForceUnlock(ctx, args)
    	}
    }
    
    // TopLocksHandler Get list of locks in use
    func (a adminAPIHandlers) TopLocksHandler(w http.ResponseWriter, r *http.Request) {
    	ctx := r.Context()
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 97.3K bytes
    - Viewed (2)
  5. cmd/lock-rest-server-common_test.go

    		TimeLastRefresh: UTCNow(),
    	}
    
    	locker.ll.lockMap["name"] = []lockRequesterInfo{
    		lockRequesterInfo1,
    		lockRequesterInfo2,
    	}
    
    	lri := locker.ll.lockMap["name"]
    
    	// test unknown uid
    	if locker.ll.removeEntry("name", dsync.LockArgs{
    		Owner: "owner",
    		UID:   "unknown-uid",
    	}, &lri) {
    		t.Errorf("Expected %#v, got %#v", false, true)
    	}
    
    	if !locker.ll.removeEntry("name", dsync.LockArgs{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 23 17:26:21 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  6. internal/lsync/lrwmutex.go

    	lm.mu.Lock()
    	defer lm.mu.Unlock()
    
    	lm.ref = 0
    	lm.isWriteLock = false
    }
    
    // DRLocker returns a sync.Locker interface that implements
    // the Lock and Unlock methods by calling drw.RLock and drw.RUnlock.
    func (lm *LRWMutex) DRLocker() sync.Locker {
    	return (*drlocker)(lm)
    }
    
    type drlocker LRWMutex
    
    func (dr *drlocker) Lock()   { (*LRWMutex)(dr).RLock() }
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  7. cmd/background-newdisks-heal-ops.go

    		return fmt.Errorf("Unexpected error disk must be initialized by now after formatting: %s", endpoint)
    	}
    
    	// Prevent parallel erasure set healing
    	locker := z.NewNSLock(minioMetaBucket, fmt.Sprintf("new-drive-healing/%d/%d", poolIdx, setIdx))
    	lkctx, err := locker.GetLock(ctx, newDiskHealingTimeout)
    	if err != nil {
    		return fmt.Errorf("Healing of drive '%v' on %s pool, belonging to %s erasure set already in progress: %w",
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  8. cmd/lock-rest-client.go

    	connection *grid.Connection
    }
    
    // IsOnline - returns whether REST client failed to connect or not.
    func (c *lockRESTClient) IsOnline() bool {
    	return c.connection.State() == grid.StateConnected
    }
    
    // Not a local locker
    func (c *lockRESTClient) IsLocal() bool {
    	return false
    }
    
    // Close - marks the client as closed.
    func (c *lockRESTClient) Close() error {
    	return nil
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Nov 24 17:07:14 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  9. cmd/local-locker_test.go

    ferhat elmas <******@****.***> 1677992255 +0100
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  10. cmd/erasure-sets.go

    				defer wg.Done()
    
    				lk.Lock()
    				// Only add lockers only one per endpoint and per erasure set.
    				if locker, ok := erasureLockers[endpoint.Host]; ok && !lockerEpSet.Contains(endpoint.Host) {
    					lockerEpSet.Add(endpoint.Host)
    					s.erasureLockers[i] = append(s.erasureLockers[i], locker)
    				}
    				lk.Unlock()
    			}(i, endpoints.Endpoints[i*setDriveCount+j])
    		}
    	}
    	wg.Wait()
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 37.5K bytes
    - Viewed (5)
Back to top