Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Ref (0.11 sec)

  1. internal/lock/lock.go

    var ErrAlreadyLocked = errors.New("file already locked")
    
    // RLockedFile represents a read locked file, implements a special
    // closer which only closes the associated *os.File when the ref count.
    // has reached zero, i.e when all the readers have given up their locks.
    type RLockedFile struct {
    	*LockedFile
    	mutex sync.Mutex
    	refs  int // Holds read lock refs.
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.5K bytes
    - Viewed (0)
  2. internal/s3select/parquet/reader.go

    	dstRec.KVS = kvs
    	return dstRec, nil
    }
    
    // convertFromAnnotation - converts values based on the Parquet column's type
    // annotations. LogicalType annotations if present override the deprecated
    // ConvertedType annotations. Ref:
    // https://github.com/apache/parquet-format/blob/master/LogicalTypes.md
    func convertFromAnnotation(se *parquettypes.SchemaElement, v interface{}) (interface{}, error) {
    	if se == nil {
    		return v, nil
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 14 13:54:47 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  3. internal/lsync/lrwmutex.go

    	lm.mu.Lock()
    	defer lm.mu.Unlock()
    
    	// Try to release lock.
    	if isWriteLock {
    		if lm.isWriteLock && lm.ref == 1 {
    			lm.ref = 0
    			lm.isWriteLock = false
    			unlocked = true
    		}
    	} else {
    		if !lm.isWriteLock {
    			if lm.ref > 0 {
    				lm.ref--
    				unlocked = true
    			}
    		}
    	}
    
    	return unlocked
    }
    
    // ForceUnlock will forcefully clear a write or read lock.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  4. cmd/namespace-lock.go

    		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 {
    			// Remove from the map if there are no more references.
    			delete(n.lockMap, resource)
    		}
    		n.lockMapMutex.Unlock()
    	}
    
    	return
    }
    
    // Unlock the namespace resource.
    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)
  5. cmd/namespace-lock_test.go

    		}()
    		time.Sleep(1 * time.Millisecond) // wait for goroutine to advance; ref=2
    
    		// Unlock the 1st lock; ref=1 after this line
    		nsLk.unlock("volume", "path", false)
    
    		// Taking another lockMapMutex here allows queuing up additional lockers. This should
    		// not be required but makes reproduction much easier.
    		nsLk.lockMapMutex.Lock()
    
    		// lk3 blocks.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 3.1K bytes
    - Viewed (0)
  6. cmd/encryption-v1_test.go

    			oRef, lRef, skipRef, snRef, psRef := decryptedRangeRef(test.decSizes, skipLen, readLen, false)
    			if o != oRef || l != lRef || skip != skipRef || sn != snRef || ps != psRef {
    				t.Errorf("Case %d: test failed: %d %d %d %d %d (Ref: %d %d %d %d %d)",
    					i, o, l, skip, sn, ps, oRef, lRef, skipRef, snRef, psRef)
    			}
    		}
    
    		// Read the last 6Mib+1 bytes of the (decrypted)
    		// object
    		//
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Sep 24 04:17:08 GMT 2022
    - 19.9K bytes
    - Viewed (0)
  7. internal/s3select/simdj/reader_amd64_test.go

    		t.Skip("Unsupported cpu")
    	}
    
    	for _, tt := range testCases {
    		t.Run(tt.name, func(t *testing.T) {
    			ref := loadCompressed(t, tt.name)
    
    			var err error
    			dst := make(chan simdjson.Object, 100)
    			dec := NewElementReader(dst, &err, &json.ReaderArgs{ContentType: "json"})
    			pj, err := simdjson.ParseND(ref, nil)
    			if err != nil {
    				t.Fatal(err)
    			}
    			i := pj.Iter()
    			cpy := i
    			b, err := cpy.MarshalJSON()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  8. internal/hash/sha256/sh256_fips.go

    import (
    	fipssha256 "crypto/sha256"
    	"hash"
    )
    
    // New returns a new hash.Hash computing the SHA256 checksum.
    // The SHA256 implementation is FIPS 140-2 compliant when the
    // boringcrypto branch of Go is used.
    // Ref: https://github.com/golang/go/tree/dev.boringcrypto
    func New() hash.Hash { return fipssha256.New() }
    
    // Sum256 returns the SHA256 checksum of the data.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Aug 29 23:57:16 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  9. internal/s3select/select.go

    func (s *ScanRange) Validate() error {
    	if s == nil {
    		return nil
    	}
    	if s.Start == nil && s.End == nil {
    		// This parameter is optional, but when specified, it must not be empty.
    		// Ref: https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange
    		return errors.New("ScanRange: No Start or End specified")
    	}
    	if s.Start == nil || s.End == nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Nov 06 22:26:08 GMT 2023
    - 21K bytes
    - Viewed (0)
  10. cmd/erasure-object_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	// PutObjectPart should succeed even if part already exists. ref: https://github.com/minio/minio/issues/1930
    	_, err = objLayer.PutObjectPart(ctx, "bucket1", "mpartObj1", res.UploadID, 1, mustGetPutObjReader(t, bytes.NewReader(fiveMBBytes), 5*humanize.MiByte, md5Hex, ""), opts)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 36.8K bytes
    - Viewed (0)
Back to top