Browse Source

error handling on reading volume ttl and replication

pull/7465/head
chrislu 4 weeks ago
parent
commit
f27e74b933
  1. 10
      weed/command/backup.go

10
weed/command/backup.go

@ -116,8 +116,9 @@ func runBackup(cmd *Command, args []string) bool {
} else { } else {
ttl, err = needle.ReadTTL(stats.Ttl) ttl, err = needle.ReadTTL(stats.Ttl)
if err != nil { if err != nil {
fmt.Printf("Error get volume %d ttl %s: %v\n", vid, stats.Ttl, err)
return true
fmt.Printf("Error parsing volume %d ttl %s from %s: %v\n", vid, stats.Ttl, volumeServer, err)
lastErr = err
continue
} }
} }
var replication *super_block.ReplicaPlacement var replication *super_block.ReplicaPlacement
@ -130,8 +131,9 @@ func runBackup(cmd *Command, args []string) bool {
} else { } else {
replication, err = super_block.NewReplicaPlacementFromString(stats.Replication) replication, err = super_block.NewReplicaPlacementFromString(stats.Replication)
if err != nil { if err != nil {
fmt.Printf("Error get volume %d replication %s : %v\n", vid, stats.Replication, err)
return true
fmt.Printf("Error parsing volume %d replication %s from %s: %v\n", vid, stats.Replication, volumeServer, err)
lastErr = err
continue
} }
} }

Loading…
Cancel
Save