File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed
Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -1526,7 +1526,7 @@ func makeTaskForMesosResources(
15261526
15271527 newTaskId := taskPtr .GetTaskId ()
15281528
1529- executor := state .CopyExecutor ()
1529+ executor := state .CopyExecutorInfo ()
15301530 executor .ExecutorID .Value = taskPtr .GetExecutorId ()
15311531 envIdS := envId .String ()
15321532
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import (
3636 "github.com/AliceO2Group/Control/common/logger/infologger"
3737 "github.com/AliceO2Group/Control/core/controlcommands"
3838 "github.com/AliceO2Group/Control/core/task/schedutil"
39+ "github.com/gogo/protobuf/proto"
3940 "github.com/looplab/fsm"
4041 mesos "github.com/mesos/mesos-go/api/v1/lib"
4142 "github.com/mesos/mesos-go/api/v1/lib/backoff"
@@ -214,17 +215,6 @@ func (state *schedulerState) Start(ctx context.Context) {
214215 }()
215216}
216217
217- func (state * schedulerState ) CopyExecutor () * mesos.ExecutorInfo {
218- executorInfoCopy := & mesos.ExecutorInfo {}
219-
220- marshaled , err := state .executor .Marshal ()
221- if err != nil {
222- return nil
223- }
224-
225- err = executorInfoCopy .Unmarshal (marshaled )
226- if err != nil {
227- return nil
228- }
229- return executorInfoCopy
218+ func (state * schedulerState ) CopyExecutorInfo () * mesos.ExecutorInfo {
219+ return proto .Clone (state .executor ).(* mesos.ExecutorInfo )
230220}
You can’t perform that action at this time.
0 commit comments