Skip to content

Commit 7747fcc

Browse files
committed
added back comments on snapshotting pods from datastore before calling schedule
Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>
1 parent 2584aad commit 7747fcc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/epp/requestcontrol/director.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ func (d *Director) HandleRequest(ctx context.Context, reqCtx *handlers.RequestCo
135135
}
136136

137137
// --- 3. Call Scheduler ---
138+
// Snapshot pod metrics from the datastore to:
139+
// 1. Reduce concurrent access to the datastore.
140+
// 2. Ensure consistent data during the scheduling operation of a request between all scheduling cycles.
138141
candidatePods := schedulingtypes.ToSchedulerPodMetrics(d.datastore.PodGetAll())
139142
results, err := d.scheduler.Schedule(ctx, reqCtx.SchedulingRequest, candidatePods)
140143
if err != nil {

0 commit comments

Comments
 (0)