Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for newLocker (0.16 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 May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  2. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  3. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  4. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 18 20:44:38 GMT 2022
    - 2.7K bytes
    - Viewed (0)
  5. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  6. internal/dsync/dsync_test.go

    func TestMain(m *testing.M) {
    	startLockServers()
    
    	// Initialize locker clients for dsync.
    	var clnts []NetLocker
    	for i := 0; i < len(nodes); i++ {
    		clnts = append(clnts, newClient(nodes[i].URL))
    	}
    
    	ds = &Dsync{
    		GetLockers: func() ([]NetLocker, string) { return clnts, uuid.New().String() },
    		Timeouts: Timeouts{
    			Acquire:         testDrwMutexAcquireTimeout,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
  7. cmd/metacache-manager.go

    	// Start saver when object layer is ready.
    	go func() {
    		objAPI := newObjectLayerFn()
    		for objAPI == nil {
    			time.Sleep(time.Second)
    			objAPI = newObjectLayerFn()
    		}
    
    		t := time.NewTicker(time.Minute)
    		defer t.Stop()
    
    		var exit bool
    		for !exit {
    			select {
    			case <-t.C:
    			case <-GlobalContext.Done():
    				exit = true
    			}
    			m.mu.RLock()
    			for _, v := range m.buckets {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Oct 25 00:44:15 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  8. cmd/namespace-lock.go

    // NewNSLock - returns a lock instance for a given volume and
    // path. The returned lockInstance object encapsulates the nsLockMap,
    // volume, path and operation ID.
    func (n *nsLockMap) NewNSLock(lockers func() ([]dsync.NetLocker, string), volume string, paths ...string) RWLocker {
    	opsID := mustGetUUID()
    	if n.isDistErasure {
    		drwmutex := dsync.NewDRWMutex(&dsync.Dsync{
    			GetLockers: lockers,
    			Timeouts:   dsync.DefaultTimeouts,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  9. cmd/batch-expire.go

    		return err
    	}
    
    	// Goroutine to periodically save batch-expire job's in-memory state
    	saverQuitCh := make(chan struct{})
    	go func() {
    		saveTicker := time.NewTicker(10 * time.Second)
    		defer saveTicker.Stop()
    		for {
    			select {
    			case <-saveTicker.C:
    				// persist in-memory state to disk after every 10secs.
    				batchLogIf(ctx, ri.updateAfter(ctx, api, 10*time.Second, job))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 21K bytes
    - Viewed (1)
  10. internal/grid/connection.go

    		c.disconnected()
    		c.connChange.L.Unlock()
    
    		conn.Close()
    		c.handleMsgWg.Done()
    	}()
    
    	c.connMu.Lock()
    	connPingInterval := c.connPingInterval
    	c.connMu.Unlock()
    	ping := time.NewTicker(connPingInterval)
    	pingFrame := message{
    		Op:         OpPing,
    		DeadlineMS: 5000,
    	}
    
    	defer ping.Stop()
    	queue := make([][]byte, 0, maxMergeMessages)
    	merged := make([]byte, 0, writeBufferSize)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
Back to top