plan: update the function of finshTask (#2996)

This commit is contained in:
Lynn
2017-04-05 21:41:37 +08:00
committed by Shen Li
parent fac3eb283b
commit 55b3cd1d88

View File

@ -76,7 +76,6 @@ func attachPlan2Task(p PhysicalPlan, t taskProfile) taskProfile {
case *rootTaskProfile:
p.SetChildren(v.plan)
v.plan = p
return nt
}
return nt
}
@ -90,7 +89,9 @@ func (t *copTaskProfile) finishTask() {
if t.addPlan2Index {
t.finishIndexPlan()
}
t.cst += float64(t.cnt) * netWorkFactor
if t.tablePlan != nil {
t.cst += float64(t.cnt) * netWorkFactor
}
}
// rootTaskProfile is the final sink node of a plan graph. It should be a single goroutine on tidb.