Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for newLocker (0.27 sec)

  1. cmd/local-locker_test.go

    	"time"
    
    	"github.com/google/uuid"
    	"github.com/minio/minio/internal/dsync"
    )
    
    func TestLocalLockerExpire(t *testing.T) {
    	wResources := make([]string, 1000)
    	rResources := make([]string, 1000)
    	l := newLocker()
    	ctx := context.Background()
    	for i := range wResources {
    		arg := dsync.LockArgs{
    			UID:       mustGetUUID(),
    			Resources: []string{mustGetUUID()},
    			Source:    t.Name(),
    			Owner:     "owner",
    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)
  2. cmd/lock-rest-server.go

    	}, func() *dsync.LockResp {
    		return &dsync.LockResp{}
    	})
    }
    
    // registerLockRESTHandlers - register lock rest router.
    func registerLockRESTHandlers() {
    	lockServer := &lockRESTServer{
    		ll: newLocker(),
    	}
    
    	logger.FatalIf(lockRPCForceUnlock.Register(globalGrid.Load(), lockServer.ForceUnlockHandler), "unable to register handler")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  3. cmd/local-locker.go

    				lris = append(lris[:i], lris[i+1:]...)
    				// Check same i
    			} else {
    				// Move to next
    				i++
    			}
    		}
    		if modified {
    			l.lockMap[k] = lris
    		}
    	}
    }
    
    func newLocker() *localLocker {
    	return &localLocker{
    		lockMap: make(map[string][]lockRequesterInfo, 1000),
    		lockUID: make(map[string]string, 1000),
    	}
    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)
  4. cmd/erasure.go

    	setIndex  int
    	poolIndex int
    
    	// getDisks returns list of storageAPIs.
    	getDisks func() []StorageAPI
    
    	// getLockers returns list of remote and local lockers.
    	getLockers func() ([]dsync.NetLocker, string)
    
    	// getEndpoints returns list of endpoint belonging this set.
    	// some may be local and some remote.
    	getEndpoints func() []Endpoint
    
    	// getEndpoints returns list of endpoint strings belonging this set.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 16K bytes
    - Viewed (1)
  5. internal/dsync/locker.go

    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package dsync
    
    import "context"
    
    // NetLocker is dsync compatible locker interface.
    type NetLocker interface {
    	// Do read lock for given LockArgs.  It should return
    	// * a boolean to indicate success/failure of the operation
    	// * an error on failure of lock request operation.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jan 18 20:44:38 GMT 2022
    - 2.7K bytes
    - Viewed (0)
  6. internal/dsync/drwmutex.go

    	}
    }
    
    // sendRelease sends a release message to a node that previously granted a lock
    func sendRelease(ctx context.Context, ds *Dsync, c NetLocker, owner string, uid string, isReadLock bool, names ...string) bool {
    	if c == nil {
    		log("Unable to call RUnlock failed with %s\n", errors.New("netLocker is offline"))
    		return false
    	}
    
    	if len(uid) == 0 {
    		return false
    	}
    
    	args := LockArgs{
    		Owner:     owner,
    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)
  7. internal/store/store.go

    func replayItems[I any](store Store[I], doneCh <-chan struct{}, log logger, id string) <-chan Key {
    	keyCh := make(chan Key)
    
    	go func() {
    		defer xioutil.SafeClose(keyCh)
    
    		retryTicker := time.NewTicker(retryInterval)
    		defer retryTicker.Stop()
    
    		for {
    			names, err := store.List()
    			if err != nil {
    				log(context.Background(), fmt.Errorf("store.List() failed with: %w", err), id)
    			} else {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  8. cmd/bucket-replication-stats.go

    		qCache:          newQueueCache(r),
    		pCache:          newProxyStatsCache(),
    		srStats:         newSRStats(),
    		movingAvgTicker: time.NewTicker(2 * time.Second),
    		wTimer:          time.NewTicker(2 * time.Second),
    		qTimer:          time.NewTicker(2 * time.Second),
    
    		workers:  newActiveWorkerStat(r),
    		registry: r,
    	}
    	go rs.collectWorkerMetrics(ctx)
    	go rs.collectQueueMetrics(ctx)
    	return &rs
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  9. cmd/listen-notification-handlers.go

    		}
    		if pingInterval < 1 {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidQueryParams), r.URL)
    			return
    		}
    		t := time.NewTicker(time.Duration(pingInterval) * time.Second)
    		defer t.Stop()
    		emptyEventTicker = t.C
    	} else {
    		// Deprecated Apr 2023
    		t := time.NewTicker(500 * time.Millisecond)
    		defer t.Stop()
    		keepAliveTicker = t.C
    	}
    
    	enc := json.NewEncoder(w)
    	for {
    		select {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6K bytes
    - Viewed (0)
  10. internal/dsync/dsync.go

    // Dsync represents dsync client object which is initialized with
    // authenticated clients, used to initiate lock REST calls.
    type Dsync struct {
    	// List of rest client objects, one per lock server.
    	GetLockers func() ([]NetLocker, string)
    
    	// Timeouts to apply.
    	Timeouts Timeouts
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 01 19:14:28 GMT 2022
    - 1K bytes
    - Viewed (0)
Back to top