diff options
| author | chrislu <chris.lu@gmail.com> | 2024-12-19 19:23:27 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-12-19 19:25:06 -0800 |
| commit | ec155022e7e8d0f30bfcfa169248ec3ecc40e960 (patch) | |
| tree | 613416a40b45bd67bb9baf87be9843798a487914 /weed/storage/erasure_coding | |
| parent | a1a76ccb8c3316baf269aa856ba268d53e0943ba (diff) | |
| download | seaweedfs-ec155022e7e8d0f30bfcfa169248ec3ecc40e960.tar.xz seaweedfs-ec155022e7e8d0f30bfcfa169248ec3ecc40e960.zip | |
"golang.org/x/exp/slices" => "slices" and go fmt
Diffstat (limited to 'weed/storage/erasure_coding')
| -rw-r--r-- | weed/storage/erasure_coding/ec_locate.go | 4 | ||||
| -rw-r--r-- | weed/storage/erasure_coding/ec_volume.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/weed/storage/erasure_coding/ec_locate.go b/weed/storage/erasure_coding/ec_locate.go index 72f8739ad..22839a809 100644 --- a/weed/storage/erasure_coding/ec_locate.go +++ b/weed/storage/erasure_coding/ec_locate.go @@ -5,7 +5,7 @@ import ( ) type Interval struct { - BlockIndex int // the index of the block in either the large blocks or the small blocks + BlockIndex int // the index of the block in either the large blocks or the small blocks InnerBlockOffset int64 Size types.Size IsLargeBlock bool // whether the block is a large block or a small block @@ -50,7 +50,7 @@ func LocateData(largeBlockLength, smallBlockLength int64, shardDatSize int64, of func locateOffset(largeBlockLength, smallBlockLength int64, shardDatSize int64, offset int64) (blockIndex int, isLargeBlock bool, nLargeBlockRows int64, innerBlockOffset int64) { largeRowSize := largeBlockLength * DataShardsCount - nLargeBlockRows = (shardDatSize-1)/ largeBlockLength + nLargeBlockRows = (shardDatSize - 1) / largeBlockLength // if offset is within the large block area if offset < nLargeBlockRows*largeRowSize { diff --git a/weed/storage/erasure_coding/ec_volume.go b/weed/storage/erasure_coding/ec_volume.go index 385d30abe..ed3ce4e2f 100644 --- a/weed/storage/erasure_coding/ec_volume.go +++ b/weed/storage/erasure_coding/ec_volume.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "golang.org/x/exp/slices" + "slices" "github.com/seaweedfs/seaweedfs/weed/pb" "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" |
