aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-10-26 20:29:13 -0700
committerchrislu <chris.lu@gmail.com>2025-10-26 20:29:13 -0700
commitf20d7c3bd5b854a9cfeb48425b5cc9c7c15a29c0 (patch)
treee256b8724b37374856455a16927b98b55c700adf
parent40f82aa806198976aa1a13c5eef3a05b73988457 (diff)
downloadseaweedfs-f20d7c3bd5b854a9cfeb48425b5cc9c7c15a29c0.tar.xz
seaweedfs-f20d7c3bd5b854a9cfeb48425b5cc9c7c15a29c0.zip
fmt
-rw-r--r--weed/storage/disk_location_ec.go6
1 files 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)