value.go
func (vlog *valueLog) sortedFids() []uint32 {
	toBeDeleted := make(map[uint32]struct{})
	for _, fid := range vlog.filesToBeDeleted {
		toBeDeleted[fid] = struct{}{}
	}
	ret := make([]uint32, 0, len(vlog.filesMap))
	for fid := range vlog.filesMap {
		if _, ok := toBeDeleted[fid]; !ok {
			ret = append(ret, fid)
		}
	}
	sort.Slice(ret, func(i, j int) bool {
		return ret[i] < ret[j]
	})
	return ret
}
func (vlog *valueLog) sortedFids() []uint32 {
	toBeDeleted := make(map[uint32]struct{})
	for _, fid := range vlog.filesToBeDeleted {
		toBeDeleted[fid] = struct{}{}
	}
	ret := make([]uint32, 0, len(vlog.filesMap))
	for fid := range vlog.filesMap {
		if _, ok := toBeDeleted[fid]; !ok {
			ret = append(ret, fid)
		}
	}
	sort.Slice(ret, func(i, j int) bool {
		return ret[i] < ret[j]
	})
	return ret
}
func ( vlog * valueLog ) sortedFids ( ) [ ] uint32 { toBeDeleted := make ( map [ uint32 ] struct { } ) for _ , fid := range vlog . filesToBeDeleted { toBeDeleted [ fid ] = struct { } { } } ret := make ( [ ] uint32 , 0 , len ( vlog . filesMap ) ) for fid := range vlog . filesMap { if _ , ok := toBeDeleted [ fid ] ; ! ok { ret = append ( ret , fid ) } } sort . Slice ( ret , func ( i , j int ) bool { return ret [ i ] < ret [ j ] } ) return ret }
// sortedFids returns the file id's not pending deletion, sorted.  Assumes we have shared access to
// filesMap.
sortedFids returns the file id s not pending deletion sorted . Assumes we have shared access to filesMap .