v1.27.0-a #10

Closed
jonathanface wants to merge 473 commits from v1.27.0-a into master
Showing only changes of commit 06a2f8c670 - Show all commits

View File

@ -324,12 +324,13 @@ func (dbi *DBIndex) StorageReportHealth(ctx context.Context, id storiface.ID, re
retryWait := time.Millisecond * 20 retryWait := time.Millisecond * 20
retryReportHealth: retryReportHealth:
_, err := dbi.harmonyDB.Exec(ctx, _, err := dbi.harmonyDB.Exec(ctx,
"UPDATE storage_path set capacity=$1, available=$2, fs_available=$3, reserved=$4, used=$5, last_heartbeat=NOW()", "UPDATE storage_path set capacity=$1, available=$2, fs_available=$3, reserved=$4, used=$5, last_heartbeat=NOW() where storage_id=$6",
report.Stat.Capacity, report.Stat.Capacity,
report.Stat.Available, report.Stat.Available,
report.Stat.FSAvailable, report.Stat.FSAvailable,
report.Stat.Reserved, report.Stat.Reserved,
report.Stat.Used) report.Stat.Used,
id)
if err != nil { if err != nil {
//return xerrors.Errorf("updating storage health in DB fails with err: %v", err) //return xerrors.Errorf("updating storage health in DB fails with err: %v", err)
if harmonydb.IsErrSerialization(err) { if harmonydb.IsErrSerialization(err) {