Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 97 for newResource (0.28 sec)

  1. internal/dsync/drwmutex.go

    		readLocks:            make([]string, len(restClnts)),
    		Names:                names,
    		clnt:                 clnt,
    		rng:                  rand.New(&lockedRandSource{src: rand.NewSource(time.Now().UTC().UnixNano())}),
    		refreshInterval:      drwMutexRefreshInterval,
    		lockRetryMinInterval: lockRetryMinInterval,
    	}
    }
    
    // Lock holds a write lock on dm.
    //
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  2. src/time/sleep_test.go

    	}
    }
    
    // Test that rapidly moving timers earlier and later doesn't cause
    // some of the sleep times to be lost.
    // Issue 47762
    func TestAdjustTimers(t *testing.T) {
    	var rnd = rand.New(rand.NewSource(Now().UnixNano()))
    
    	timers := make([]*Timer, 100)
    	states := make([]int, len(timers))
    	indices := rnd.Perm(len(timers))
    
    	for len(indices) != 0 {
    		var ii = rnd.Intn(len(indices))
    		var i = indices[ii]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:33:57 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  3. cmd/erasure-server-pool-rebalance.go

    	go func() {
    		// Update rebalance.bin periodically once every 5-10s, chosen randomly
    		// to avoid multiple pool leaders herding to update around the same
    		// time.
    		r := rand.New(rand.NewSource(time.Now().UnixNano()))
    		randSleepFor := func() time.Duration {
    			return 5*time.Second + time.Duration(float64(5*time.Second)*r.Float64())
    		}
    
    		timer := time.NewTimer(randSleepFor())
    		defer timer.Stop()
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 03 15:45:54 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  4. cmd/batch-handlers.go

    	if ri.Complete {
    		return nil
    	}
    	globalBatchJobsMetrics.save(job.ID, ri)
    
    	delay := job.Replicate.Flags.Retry.Delay
    	if delay == 0 {
    		delay = batchReplJobDefaultRetryDelay
    	}
    	rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	hasTags := len(r.Flags.Filter.Tags) != 0
    	isMetadata := len(r.Flags.Filter.Metadata) != 0
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 03:13:30 UTC 2024
    - 56K bytes
    - Viewed (0)
  5. src/context/x_test.go

    }
    
    func TestLayersTimeout(t *testing.T) {
    	testLayers(t, time.Now().UnixNano(), true)
    }
    
    func testLayers(t *testing.T, seed int64, testTimeout bool) {
    	t.Parallel()
    
    	r := rand.New(rand.NewSource(seed))
    	prefix := fmt.Sprintf("seed=%d", seed)
    	errorf := func(format string, a ...any) {
    		t.Errorf(prefix+format, a...)
    	}
    	const (
    		minLayers = 30
    	)
    	type value int
    	var (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/handler_test.go

    	waitGroup := sync.WaitGroup{}
    
    	// Spawn a bunch of writers that randomly add groups, remove groups, and
    	// reset the list of groups
    	for i := 0; i < numWriters; i++ {
    		source := rand.NewSource(int64(i))
    
    		waitGroup.Add(1)
    		go func() {
    			defer waitGroup.Done()
    
    			// track list of groups we've added so that we can remove them
    			// randomly
    			var addedGroups []metav1.GroupVersion
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 02 00:29:39 UTC 2024
    - 28.6K bytes
    - Viewed (0)
  7. cmd/iam.go

    	sys.initStore(objAPI, etcdClient)
    	sys.Unlock()
    
    	retryCtx, cancel := context.WithCancel(ctx)
    
    	// Indicate to our routine to exit cleanly upon return.
    	defer cancel()
    
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	// Migrate storage format if needed.
    	for {
    		// Migrate IAM configuration, if necessary.
    		if err := saveIAMFormat(retryCtx, sys.store); err != nil {
    			if configRetriableErrors(err) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 71.9K bytes
    - Viewed (0)
  8. cmd/erasure-server-pool-decom.go

    		go func() {
    			// Resume decommissioning of pools, but wait 3 minutes for cluster to stabilize.
    			if err := sleepContext(ctx, 3*time.Minute); err != nil {
    				return
    			}
    			r := rand.New(rand.NewSource(time.Now().UnixNano()))
    			for {
    				if err := z.Decommission(ctx, poolIndices...); err != nil {
    					if errors.Is(err, errDecommissionAlreadyRunning) {
    						// A previous decommission running found restart it.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 06 14:30:43 UTC 2024
    - 41.5K bytes
    - Viewed (1)
  9. cmd/xl-storage-disk-id-check.go

    		if skipIfSuccessBefore <= 0 {
    			skipIfSuccessBefore = globalDriveConfig.GetMaxTimeout()
    		}
    	}
    
    	t := time.NewTicker(checkEvery)
    	defer t.Stop()
    	fn := mustGetUUID()
    
    	rng := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	monitor := func() bool {
    		if contextCanceled(ctx) {
    			return false
    		}
    
    		if p.health.status.Load() != diskHealthOK {
    			return true
    		}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  10. cmd/notification.go

    //
    // The first call to return a non-nil error will be
    // collected in errs slice and returned by Wait().
    func (g *NotificationGroup) Go(ctx context.Context, f func() error, index int, addr xnet.Host) {
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	g.workers.Take()
    
    	go func() {
    		defer g.workers.Give()
    
    		g.errs[index] = NotificationPeerErr{
    			Host: addr,
    		}
    
    		retryCount := g.retryCount
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 44.9K bytes
    - Viewed (0)
Back to top