Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for lockMap (0.2 sec)

  1. cmd/local-locker_test.go

    		if err != nil {
    			t.Fatal(err)
    		}
    		if !ok {
    			t.Fatal("did not get write lock")
    		}
    
    		rResources[i] = arg.Resources[0]
    	}
    	if len(l.lockMap) != len(rResources)+len(wResources) {
    		t.Fatalf("lockmap len, got %d, want %d + %d", len(l.lockMap), len(rResources), len(wResources))
    	}
    	if len(l.lockUID) != len(rResources)+len(wResources) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  2. internal/dsync/dsync-server_test.go

    	var locksHeld int64
    	if locksHeld, reply = l.lockMap[args.Resources[0]]; !reply {
    		l.lockMap[args.Resources[0]] = ReadLock // No locks held on the given name, so claim (first) read lock
    		reply = true
    	} else if reply = locksHeld != WriteLock; reply { // Unless there is a write lock
    		l.lockMap[args.Resources[0]] = locksHeld + ReadLock // Grant another read lock
    	}
    	return reply, nil
    }
    
    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)
  3. cmd/local-locker.go

    		Quorum:          args.Quorum,
    	}
    	if lri, ok := l.lockMap[resource]; ok {
    		if reply = !isWriteLock(lri); reply {
    			// Unless there is a write lock
    			l.lockMap[resource] = append(l.lockMap[resource], lrInfo)
    			l.lockUID[formatUUID(args.UID, 0)] = resource
    		}
    	} else {
    		// No locks held on the given name, so claim (first) read lock
    		l.lockMap[resource] = []lockRequesterInfo{lrInfo}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  4. cmd/lock-rest-server-common_test.go

    		Writer:          true,
    		UID:             "89ab-cdef",
    		Timestamp:       UTCNow(),
    		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) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 23 17:26:21 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  5. cmd/namespace-lock.go

    	defer n.lockMapMutex.Unlock()
    	if _, found := n.lockMap[resource]; !found {
    		return
    	}
    	if readLock {
    		n.lockMap[resource].RUnlock()
    	} else {
    		n.lockMap[resource].Unlock()
    	}
    	n.lockMap[resource].ref--
    	if n.lockMap[resource].ref < 0 {
    		logger.CriticalIf(GlobalContext, errors.New("resource reference count was lower than 0"))
    	}
    	if n.lockMap[resource].ref == 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  6. cmd/namespace-lock_test.go

    		//    successfully acquiring the lock.
    		// 2) lk2 then needs to advance and remove the resource from lockMap.
    		// 3) lk3 or lk4 (whichever didn't execute in step 1) then executes and creates
    		//    a new entry in lockMap and acquires a lock for the same resource.
    
    		<-lk2ch
    		lk3ok := <-lk3ch
    		lk4ok := <-lk4ch
    
    		if lk3ok && lk4ok {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 3.1K bytes
    - Viewed (0)
  7. cmd/peer-rest-client.go

    func (client *peerRESTClient) Close() error {
    	client.restClient.Close()
    	return nil
    }
    
    // GetLocks - fetch older locks for a remote node.
    func (client *peerRESTClient) GetLocks() (lockMap map[string][]lockRequesterInfo, err error) {
    	resp, err := getLocksRPC.Call(context.Background(), client.gridConn(), grid.NewMSS())
    	if err != nil || resp == nil {
    		return nil, err
    	}
    	return *resp, nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        expected = assertThrows(PotentialDeadlockException.class, () -> lockA.lock());
        checkMessage(expected, "LockB -> LockA", "LockA -> LockB");
        // The causal chain should be cached.
        assertSame(firstException.getCause(), expected.getCause());
        // lockA should work after lockB is released.
        lockB.unlock();
        lockA.lock();
      }
    
      // Tests transitive deadlock detection.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        expected = assertThrows(PotentialDeadlockException.class, () -> lockA.lock());
        checkMessage(expected, "LockB -> LockA", "LockA -> LockB");
        // The causal chain should be cached.
        assertSame(firstException.getCause(), expected.getCause());
        // lockA should work after lockB is released.
        lockB.unlock();
        lockA.lock();
      }
    
      // Tests transitive deadlock detection.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (1)
  10. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.h

        absl::CondVar cond_var;
      };
    
      /// \brief The block map type for the file block cache.
      ///
      /// The block map is an ordered map from Key to Block.
      typedef std::map<Key, std::shared_ptr<Block>> BlockMap;
    
      /// Prune the cache by removing files with expired blocks.
      void Prune() ABSL_LOCKS_EXCLUDED(mu_);
    
      bool BlockNotStale(const std::shared_ptr<Block>& block)
          ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_);
    
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 04:46:34 GMT 2020
    - 10.6K bytes
    - Viewed (0)
Back to top