aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/storage/disk_location_ec.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go
index ad4f82f98..47b7f8e29 100644
--- a/weed/storage/disk_location_ec.go
+++ b/weed/storage/disk_location_ec.go
@@ -246,6 +246,8 @@ func (l *DiskLocation) loadAllEcShards() (err error) {
if util.FileExists(datFileName) {
glog.Warningf("Found %d EC shards without .ecx file for volume %d (incomplete encoding interrupted before .ecx creation), cleaning up...",
len(sameVolumeShards), volumeId)
+ // Clean up any in-memory state before removing files
+ l.DestroyEcVolume(volumeId)
l.removeEcVolumeFiles(collection, volumeId)
}
}