Browse Source

fix(weed/worker/tasks/ec_balance): non-recursive reportProgress (#8892)

* fix(weed/worker/tasks/ec_balance): non-recursive reportProgress

* fix(ec_balance): call ReportProgressWithStage and include volumeID in log

The original fix replaced infinite recursion with a glog.Infof, but
skipped the framework progress callback. This adds the missing
ReportProgressWithStage call so the admin server receives EC balance
progress, and includes volumeID in the log for disambiguation.

---------

Co-authored-by: Chris Lu <chris.lu@gmail.com>
pull/8311/merge
Lars Lehtonen 19 hours ago
committed by GitHub
parent
commit
3a5016bcd7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      weed/worker/tasks/ec_balance/ec_balance_task.go

3
weed/worker/tasks/ec_balance/ec_balance_task.go

@ -212,7 +212,8 @@ func (t *ECBalanceTask) GetProgress() float64 {
// reportProgress updates the stored progress and reports it via the callback
func (t *ECBalanceTask) reportProgress(progress float64, stage string) {
t.progress = progress
t.reportProgress(progress, stage)
t.ReportProgressWithStage(progress, stage)
glog.Infof("EC balance volume %d: [%.2f] %s", t.volumeID, progress, stage)
}
// isDedupPhase checks if this is a dedup-phase task (source and target are the same node)

Loading…
Cancel
Save