diff --git a/pkg/scheduler/objects/application.go b/pkg/scheduler/objects/application.go index 61ac32de1..57749c890 100644 --- a/pkg/scheduler/objects/application.go +++ b/pkg/scheduler/objects/application.go @@ -105,6 +105,7 @@ func NewApplication(siApp *si.AddApplicationRequest, ugi security.UserGroup, eve stateMachine: NewAppState(), placeholderAsk: resources.NewResourceFromProto(siApp.PlaceholderAsk), finishedTime: time.Time{}, + rejectionMessage: "", } placeholderTimeout := common.ConvertSITimeout(siApp.ExecutionTimeoutMilliSeconds) if time.Duration(0) == placeholderTimeout { diff --git a/pkg/scheduler/partition.go b/pkg/scheduler/partition.go index efb68db09..2d962c14c 100644 --- a/pkg/scheduler/partition.go +++ b/pkg/scheduler/partition.go @@ -1491,8 +1491,8 @@ func (pc *PartitionContext) hasUnlimitedNode() bool { } func (pc *PartitionContext) addRejectedApplication(rejectedApplication *objects.Application,rejectionMessage string) error { - pc.Lock() - pc.Unlock() + rejectedApplication.GetRejectionMessage() + rejectedApplication.GetRejectionMessage() if err := rejectedApplication.HandleApplicationEvent(objects.RejectApplication); err != nil { log.Logger().Warn("Application state not changed to Rejected", zap.String("currentState", rejectedApplication.CurrentState()),