Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for sortsBefore (0.1 sec)

  1. cmd/xl-storage-format-v2.go

    func (x xlMetaV2VersionHeader) hasEC() bool {
    	return x.EcM > 0 && x.EcN > 0
    }
    
    // sortsBefore can be used as a tiebreaker for stable sorting/selecting.
    // Returns false on ties.
    func (x xlMetaV2VersionHeader) sortsBefore(o xlMetaV2VersionHeader) bool {
    	if x == o {
    		return false
    	}
    	// Prefer newest modtime.
    	if x.ModTime != o.ModTime {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 64K bytes
    - Viewed (1)
  2. cmd/metacache-entries.go

    			}
    			if !strict && eVer.header.matchesNotStrict(oVer.header) {
    				if prefer == nil {
    					if eVer.header.sortsBefore(oVer.header) {
    						prefer = e
    					} else {
    						prefer = other
    					}
    				}
    				continue
    			}
    			if prefer != nil {
    				return prefer, false
    			}
    
    			if eVer.header.sortsBefore(oVer.header) {
    				return e, false
    			}
    			return other, false
    		}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  3. cmd/xl-storage-format-v2_test.go

    		}
    		if len(xl.versions) != 3 {
    			t.Fatal("Got wrong number of versions, want 3, got", len(xl.versions))
    		}
    		if !sort.SliceIsSorted(xl.versions, func(i, j int) bool {
    			return xl.versions[i].header.sortsBefore(xl.versions[j].header)
    		}) {
    			t.Errorf("Got unsorted result")
    		}
    	}
    }
    
    func TestXMinIOHealingSkip(t *testing.T) {
    	xl := xlMetaV2{}
    	failOnErr := func(err error) {
    		t.Helper()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Mar 08 17:50:48 UTC 2024
    - 36.4K bytes
    - Viewed (0)
Back to top