Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix(admin): skip task state files with no task data on load

Chris Lu57ffef85435b
diff --git a/weed/admin/dash/config_persistence.go b/weed/admin/dash/config_persistence.go
index 63d6bcdccb..fa3a0b43de 100644
--- a/weed/admin/dash/config_persistence.go
+++ b/weed/admin/dash/config_persistence.go
@@ -1088,6 +1088,10 @@ func (cp *ConfigPersistence) loadTaskStateLocked(taskID string) (*maintenance.Ma
return nil, fmt.Errorf("failed to unmarshal task state protobuf: %w", err)
}
+ if taskStateFile.Task == nil {
+ return nil, fmt.Errorf("task state file %s contains no task data", taskID)
+ }
+
// Convert protobuf to maintenance task
task := cp.protobufToMaintenanceTask(taskStateFile.Task)