Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Hockman (0.19 sec)

  1. 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 28 19:28:10 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  2. 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 28 19:28:10 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  3. 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 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 23 17:26:21 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  4. 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 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 3.1K bytes
    - Viewed (0)
Back to top