From f20d7c3bd5b854a9cfeb48425b5cc9c7c15a29c0 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 26 Oct 2025 20:29:13 -0700 Subject: [PATCH] fmt --- weed/storage/disk_location_ec.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go index 21bafeee3..18745b5e8 100644 --- a/weed/storage/disk_location_ec.go +++ b/weed/storage/disk_location_ec.go @@ -318,12 +318,12 @@ func (l *DiskLocation) checkOrphanedShards(shards []string, collection string, v if len(shards) == 0 || volumeId == 0 { return false } - + // Check if .dat file exists (incomplete encoding, not distributed EC) // Use os.Stat for robust error handling; unexpected errors treated as "exists" baseFileName := erasure_coding.EcShardFileName(collection, l.Directory, int(volumeId)) datFileName := baseFileName + ".dat" - + datExists := false if _, err := os.Stat(datFileName); err == nil { datExists = true @@ -332,7 +332,7 @@ func (l *DiskLocation) checkOrphanedShards(shards []string, collection string, v // Safer to assume local .dat exists to avoid misclassifying as distributed EC datExists = true } - + if datExists { glog.Warningf("Found %d EC shards without .ecx file for volume %d (incomplete encoding interrupted before .ecx creation), cleaning up...", len(shards), volumeId)