Skip to content

Commit

Permalink
Fixed an error during checking objectHealth in metadata.go during cop…
Browse files Browse the repository at this point in the history
…ying a 0-byte file.
  • Loading branch information
danielMd2805 committed Nov 24, 2023
1 parent 2efacaf commit 3fd9eb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stores/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,7 @@ func (s *SQLStore) object(ctx context.Context, txn *gorm.DB, bucket string, path

func (s *SQLStore) objectHealth(ctx context.Context, tx *gorm.DB, objectID uint) (health float64, err error) {
if err = tx.
Select("MIN(sla.health)").
Select("COALESCE(MIN(sla.health), 1)").
Model(&dbObject{}).
Table("objects o").
Joins("LEFT JOIN slices sli ON o.id = sli.`db_object_id`").
Expand Down

0 comments on commit 3fd9eb8

Please sign in to comment.