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>
This commit is contained in:
@@ -212,7 +212,8 @@ func (t *ECBalanceTask) GetProgress() float64 {
|
|||||||
// reportProgress updates the stored progress and reports it via the callback
|
// reportProgress updates the stored progress and reports it via the callback
|
||||||
func (t *ECBalanceTask) reportProgress(progress float64, stage string) {
|
func (t *ECBalanceTask) reportProgress(progress float64, stage string) {
|
||||||
t.progress = progress
|
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)
|
// isDedupPhase checks if this is a dedup-phase task (source and target are the same node)
|
||||||
|
|||||||
Reference in New Issue
Block a user