Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for unLocker (0.18 sec)

  1. cmd/metrics-v3-handler.go

    			// are provided, we will not return bucket metrics.
    			if bmg, ok := h.metricsData.bucketMGMap[collectorPath]; ok {
    				if len(buckets) == 0 {
    					continue
    				}
    				unLocker := bmg.LockAndSetBuckets(buckets)
    				defer unLocker()
    			}
    			gatherers = append(gatherers, gatherer)
    		}
    	}
    
    	if len(gatherers) == 0 {
    		return notFoundHandler
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  2. internal/dsync/drwmutex.go

    // checkFailedUnlocks determines whether we have sufficiently unlocked all
    // resources to ensure no deadlocks for future callers
    func checkFailedUnlocks(locks []string, tolerance int) bool {
    	unlocksFailed := 0
    	for lockID := range locks {
    		if isLocked(locks[lockID]) {
    			unlocksFailed++
    		}
    	}
    
    	// Unlock failures are higher than tolerance limit
    	// for this instance of unlocker, we should let the
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  3. internal/lsync/lrwmutex.go

    	}
    }
    
    func (lm *LRWMutex) unlock(isWriteLock bool) (unlocked bool) {
    	lm.mu.Lock()
    	defer lm.mu.Unlock()
    
    	// Try to release lock.
    	if isWriteLock {
    		if lm.isWriteLock && lm.ref == 1 {
    			lm.ref = 0
    			lm.isWriteLock = false
    			unlocked = true
    		}
    	} else {
    		if !lm.isWriteLock {
    			if lm.ref > 0 {
    				lm.ref--
    				unlocked = true
    			}
    		}
    	}
    
    	return unlocked
    }
    
    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)
  4. internal/lsync/lrwmutex_test.go

    func TestUnlockPanic(t *testing.T) {
    	defer func() {
    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    	}()
    	mu := NewLRWMutex()
    	mu.Unlock()
    }
    
    // Borrowed from rwmutex_test.go
    func TestUnlockPanic2(t *testing.T) {
    	defer func() {
    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    	}()
    	mu := NewLRWMutex()
    	mu.RLock()
    	mu.Unlock()
    }
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  5. internal/dsync/locker.go

    	// In that case, the resource may or may not be unlocked.
    	RUnlock(ctx context.Context, args LockArgs) (bool, error)
    
    	// Do write unlock for given LockArgs. It should return
    	// * a boolean to indicate success/failure of the operation
    	// * an error on failure of unlock request operation.
    	// Canceling the context will abort the remote call.
    	// In that case, the resource may or may not be unlocked.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jan 18 20:44:38 GMT 2022
    - 2.7K bytes
    - Viewed (0)
  6. internal/dsync/drwmutex_test.go

    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    	}()
    	mu := NewDRWMutex(ds, "test")
    	mu.Unlock(context.Background())
    }
    
    // Borrowed from rwmutex_test.go
    func TestUnlockPanic2(t *testing.T) {
    	mu := NewDRWMutex(ds, "test-unlock-panic-2")
    	defer func() {
    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  7. internal/dsync/lock-args.go

    // LockArgs is minimal required values for any dsync compatible lock operation.
    type LockArgs struct {
    	// Unique ID of lock/unlock request.
    	UID string
    
    	// Resources contains single or multiple entries to be locked/unlocked.
    	Resources []string
    
    	// Source contains the line number, function and file name of the code
    	// on the client node that requested the lock.
    	Source string
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 04:34:26 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  8. internal/dsync/dsync-server_test.go

    	}
    
    	l.mutex.Lock()
    	defer l.mutex.Unlock()
    	var locksHeld int64
    	if locksHeld, reply = l.lockMap[args.Resources[0]]; !reply { // No lock is held on the given name
    		return false, fmt.Errorf("Unlock attempted on an unlocked entity: %s", args.Resources[0])
    	}
    	if reply = locksHeld == WriteLock; !reply { // Unless it is a write lock
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  9. internal/lock/lock_test.go

    	l, err := LockedOpenFile(f.Name(), os.O_WRONLY, 0o600)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// unlock the file
    	if err = l.Close(); err != nil {
    		t.Fatal(err)
    	}
    
    	// try lock the unlocked file
    	dupl, err := LockedOpenFile(f.Name(), os.O_WRONLY|os.O_CREATE, 0o600)
    	if err != nil {
    		t.Errorf("err = %v, want %v", err, nil)
    	}
    
    	// blocking on locked file
    	locked := make(chan struct{}, 1)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/util/MD4.java

    // This file is currently unlocked (change this line if you lock the file)
    //
    // $Log: MD4.java,v $
    // Revision 1.2  1998/01/05 03:41:19  iang
    // Added references only.
    //
    // Revision 1.1.1.1  1997/11/03 22:36:56  hopwood
    // + Imported to CVS (tagged as 'start').
    //
    // Revision 0.1.0.0  1997/07/14  R. Naffah
    // + original version
    //
    // $Endlog$
    /*
     * Copyright (c) 1997 Systemics Ltd
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 9.3K bytes
    - Viewed (0)
Back to top