mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-05-23 02:01:32 +00:00
refactor(ec): drop unused buffer/block-size params from generateMissingEcFiles
The function only routes through rebuildEcFiles, which uses ErasureCodingSmallBlockSize directly. The buffer/block-size knobs threaded in from RebuildEcFilesWithContext were never read. Drop them from the signature and the sole caller; encoding still goes through generateEcFiles which keeps its own copies of the same params.
This commit is contained in:
@@ -99,7 +99,7 @@ func RebuildEcFiles(baseFileName string, additionalDirs ...string) ([]uint32, er
|
||||
// RebuildEcFilesWithContext rebuilds missing EC files using the provided context.
|
||||
// additionalDirs are extra directories to search for existing shard files.
|
||||
func RebuildEcFilesWithContext(baseFileName string, ctx *ECContext, additionalDirs ...string) ([]uint32, error) {
|
||||
return generateMissingEcFiles(baseFileName, 256*1024, ErasureCodingLargeBlockSize, ErasureCodingSmallBlockSize, ctx, additionalDirs)
|
||||
return generateMissingEcFiles(baseFileName, ctx, additionalDirs)
|
||||
}
|
||||
|
||||
func ToExt(ecIndex int) string {
|
||||
@@ -155,7 +155,7 @@ func findShardFile(baseFileName string, ext string, additionalDirs []string) (sh
|
||||
return
|
||||
}
|
||||
|
||||
func generateMissingEcFiles(baseFileName string, bufferSize int, largeBlockSize int64, smallBlockSize int64, ctx *ECContext, additionalDirs []string) (generatedShardIds []uint32, err error) {
|
||||
func generateMissingEcFiles(baseFileName string, ctx *ECContext, additionalDirs []string) (generatedShardIds []uint32, err error) {
|
||||
|
||||
// Pass 1: discover which shards exist and which are missing,
|
||||
// opening input files but NOT creating output files yet.
|
||||
|
||||
Reference in New Issue
Block a user