Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for SafeClose (0.16 sec)

  1. cmd/storage-rest-server.go

    func (c *closeNotifier) Read(p []byte) (n int, err error) {
    	n, err = c.rc.Read(p)
    	if err != nil {
    		if c.done != nil {
    			xioutil.SafeClose(c.done)
    			c.done = nil
    		}
    	}
    	return n, err
    }
    
    func (c *closeNotifier) Close() error {
    	if c.done != nil {
    		xioutil.SafeClose(c.done)
    		c.done = nil
    	}
    	return c.rc.Close()
    }
    
    // keepHTTPReqResponseAlive can be used to avoid timeouts with long storage
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  2. cmd/erasure-server-pool.go

    			disks, infos, _ := set.getOnlineDisksWithHealingAndInfo(true)
    			if len(disks) == 0 {
    				xioutil.SafeClose(results)
    				cancel()
    				return fmt.Errorf("Walk: no online disks found in pool %d, set %d", setIdx, poolIdx)
    			}
    			go func() {
    				defer xioutil.SafeClose(listOut)
    				send := func(e metaCacheEntry) {
    					if e.isDir() {
    						// Ignore directories.
    						return
    					}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  3. cmd/xl-storage-disk-id-check.go

    	if contextCanceled(ctx) {
    		xioutil.SafeClose(updates)
    		return dataUsageCache{}, ctx.Err()
    	}
    
    	if err := p.checkDiskStale(); err != nil {
    		xioutil.SafeClose(updates)
    		return dataUsageCache{}, err
    	}
    
    	weSleep := func() bool {
    		return scannerIdleMode.Load() == 0
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  4. cmd/erasure.go

    		}
    	}
    	for _, idx := range permutes {
    		b := buckets[idx]
    		if e := oldCache.find(b.Name); e != nil {
    			cache.replace(b.Name, dataUsageRoot, *e)
    			bucketCh <- b
    		}
    	}
    	xioutil.SafeClose(bucketCh)
    
    	bucketResults := make(chan dataUsageEntryInfo, len(disks))
    
    	// Start async collector/saver.
    	// This goroutine owns the cache.
    	var saverWg sync.WaitGroup
    	saverWg.Add(1)
    	go func() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 16K bytes
    - Viewed (1)
  5. cmd/storage-rest-client.go

    	return nil
    }
    
    func (client *storageRESTClient) NSScanner(ctx context.Context, cache dataUsageCache, updates chan<- dataUsageEntry, scanMode madmin.HealScanMode, _ func() bool) (dataUsageCache, error) {
    	defer xioutil.SafeClose(updates)
    
    	st, err := storageNSScannerRPC.Call(ctx, client.gridConn, &nsScannerOptions{
    		DiskID:   *client.diskID.Load(),
    		ScanMode: int(scanMode),
    		Cache:    &cache,
    	})
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  6. cmd/bucket-replication.go

    		i := i
    		go p.AddLargeWorker(p.lrgworkers[i])
    	}
    	go func() {
    		<-p.ctx.Done()
    		for i := 0; i < LargeWorkerCount; i++ {
    			xioutil.SafeClose(p.lrgworkers[i])
    		}
    	}()
    }
    
    // AddLargeWorker adds a replication worker to the static pool for large uploads.
    func (p *ReplicationPool) AddLargeWorker(input <-chan ReplicationWorkerOperation) {
    	for {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 112.2K bytes
    - Viewed (1)
  7. cmd/batch-handlers.go

    		Opts:     minio.PutObjectOptions{},
    		InMemory: *r.Source.Snowball.InMemory,
    		Compress: *r.Source.Snowball.Compress,
    		SkipErrs: *r.Source.Snowball.SkipErrs,
    	}
    
    	go func() {
    		defer xioutil.SafeClose(input)
    
    		for _, entry := range entries {
    			gr, err := objAPI.GetObjectNInfo(ctx, r.Source.Bucket,
    				entry.Name, nil, nil, ObjectOptions{
    					VersionID: entry.VersionID,
    				})
    			if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 55.2K bytes
    - Viewed (0)
  8. cmd/global-heal.go

    					entry, _ = entries.firstFound()
    				}
    				jt.Take()
    				go healEntry(bucket, *entry)
    			},
    			finished: nil,
    		})
    		jt.Wait() // synchronize all the concurrent heal jobs
    		xioutil.SafeClose(results)
    		if err != nil {
    			// Set this such that when we return this function
    			// we let the caller retry this disk again for the
    			// buckets it failed to list.
    			retErr = err
    			healingLogIf(ctx, err)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 15K bytes
    - Viewed (1)
  9. cmd/erasure-sets.go

    	}
    
    	for _, err := range g.Wait() {
    		if err != nil {
    			return err
    		}
    	}
    	select {
    	case _, ok := <-s.setReconnectEvent:
    		if ok {
    			xioutil.SafeClose(s.setReconnectEvent)
    		}
    	default:
    		xioutil.SafeClose(s.setReconnectEvent)
    	}
    	return nil
    }
    
    // hashes the key returning an integer based on the input algorithm.
    // This function currently supports
    // - CRCMOD
    // - SIPMOD
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 37.7K bytes
    - Viewed (5)
  10. cmd/erasure-server-pool-rebalance.go

    	}
    	return false
    }
    
    func (z *erasureServerPools) rebalanceBuckets(ctx context.Context, poolIdx int) (err error) {
    	doneCh := make(chan error, 1)
    	defer xioutil.SafeClose(doneCh)
    
    	// Save rebalance.bin periodically.
    	go func() {
    		// Update rebalance.bin periodically once every 5-10s, chosen randomly
    		// to avoid multiple pool leaders herding to update around the same
    		// time.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
Back to top