Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for AddObjectPart (0.34 sec)

  1. cmd/erasure-metadata_test.go

    package cmd
    
    import (
    	"context"
    	"fmt"
    	"slices"
    	"strconv"
    	"testing"
    	"time"
    
    	"github.com/dustin/go-humanize"
    )
    
    const ActualSize = 1000
    
    // Test FileInfo.AddObjectPart()
    func TestAddObjectPart(t *testing.T) {
    	testCases := []struct {
    		partNum       int
    		expectedIndex int
    	}{
    		{1, 0},
    		{2, 1},
    		{4, 2},
    		{5, 3},
    		{7, 4},
    		// Insert part.
    		{3, 2},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jul 25 21:02:50 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  2. cmd/erasure-metadata.go

    func objectPartIndexNums(parts []int, partNumber int) int {
    	for i, part := range parts {
    		if part != 0 && partNumber == part {
    			return i
    		}
    	}
    	return -1
    }
    
    // AddObjectPart - add a new object part in order.
    func (fi *FileInfo) AddObjectPart(partNumber int, partETag string, partSize, actualSize int64, modTime time.Time, idx []byte, checksums map[string]string) {
    	partInfo := ObjectPartInfo{
    		Number:     partNumber,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 21.3K bytes
    - Viewed (0)
  3. cmd/erasure-healing.go

    				if writers[i] == nil {
    					outDatedDisks[i] = nil
    					disksToHealCount--
    					continue
    				}
    
    				partsMetadata[i].DataDir = dstDataDir
    				partsMetadata[i].AddObjectPart(partNumber, "", partSize, partActualSize, partModTime, partIdx, partChecksums)
    				if len(inlineBuffers) > 0 && inlineBuffers[i] != nil {
    					partsMetadata[i].Data = inlineBuffers[i].Bytes()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 02 17:50:41 UTC 2024
    - 34.4K bytes
    - Viewed (0)
  4. cmd/erasure-object.go

    			// Make sure to avoid writing to disks which we couldn't complete in erasure.Encode()
    			onlineDisks[i] = nil
    			continue
    		}
    		partsMetadata[i].Data = inlineBuffers[i].Bytes()
    		partsMetadata[i].AddObjectPart(1, "", n, data.ActualSize(), modTime, index, nil)
    	}
    
    	// Fill all the necessary metadata.
    	// Update `xl.meta` content on each disks.
    	for index := range partsMetadata {
    		partsMetadata[index].Size = n
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 78.8K bytes
    - Viewed (0)
  5. cmd/erasure-multipart.go

    			return oi, InvalidPart{
    				PartNumber: part.Number,
    			}
    		}
    
    		// Add the current part.
    		fi.AddObjectPart(part.Number, part.ETag, part.Size, part.ActualSize, part.ModTime, part.Index, part.Checksums)
    	}
    
    	// Calculate full object size.
    	var objectSize int64
    
    	// Calculate consolidated actual size.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 44.7K bytes
    - Viewed (0)
Back to top