Skip to content

Commit eeb85d7

Browse files
authored
fix: runtime service wg not released properly (#6489)
Signed-off-by: Ash <[email protected]>
1 parent 901fdeb commit eeb85d7

File tree

2 files changed

+2
-5
lines changed
  • internal
    • apps/dop/component-protocol/components/app-runtime/list
    • tools/orchestrator/services/runtime

2 files changed

+2
-5
lines changed

internal/apps/dop/component-protocol/components/app-runtime/list/list.go

-4
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,6 @@ func (p *List) getData() *list.Data {
281281
return data
282282
}
283283
appIds = append(appIds, appId)
284-
if err != nil {
285-
logrus.Errorf("get my app failed,%v", err)
286-
return data
287-
}
288284

289285
apps, err := p.Bdl.GetMyApps(p.Sdk.Identity.UserID, oid)
290286
if err != nil {

internal/tools/orchestrator/services/runtime/runtime.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,8 @@ func (r *Runtime) GetServiceByRuntime(runtimeIDs []uint64) (map[uint64]*apistruc
15261526
sync.RWMutex
15271527
m map[uint64]*apistructs.RuntimeSummaryDTO
15281528
}, deployment *dbclient.Deployment, runtimeHPARules []dbclient.RuntimeHPA, runtimeVPARules []dbclient.RuntimeVPA) {
1529+
defer wg.Done()
1530+
15291531
d := apistructs.RuntimeSummaryDTO{}
15301532
sg, err := r.serviceGroupImpl.InspectServiceGroupWithTimeout(rt.ScheduleName.Namespace, rt.ScheduleName.Name)
15311533
if err != nil {
@@ -1545,7 +1547,6 @@ func (r *Runtime) GetServiceByRuntime(runtimeIDs []uint64) (map[uint64]*apistruc
15451547
servicesMap.Lock()
15461548
servicesMap.m[rt.ID] = &d
15471549
servicesMap.Unlock()
1548-
wg.Done()
15491550
}(runtime, &wg, &servicesMap, deployment, runtimeHPARules, runtimeVPARules)
15501551
}
15511552
}

0 commit comments

Comments
 (0)