[MM-35424] Fix job schedulers server from missing leader change event (#17602)
* Fix cluster leader change message potentially getting lost * Start jobs and schedulers earlier in server initialization * Fix possible deadlock * Update jobs/schedulers.go Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com> Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4c4d889739
Коммит
7bb23323d1
@@ -662,6 +662,16 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if s.runEssentialJobs {
|
||||
s.Go(func() {
|
||||
s.runLicenseExpirationCheckJob()
|
||||
runCheckAdminSupportStatusJob(fakeApp, c)
|
||||
runCheckWarnMetricStatusJob(fakeApp, c)
|
||||
runDNDStatusExpireJob(fakeApp)
|
||||
})
|
||||
s.runJobs()
|
||||
}
|
||||
|
||||
s.doAppMigrations()
|
||||
|
||||
s.initPostMetadata()
|
||||
@@ -674,15 +684,6 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
s.ShutDownPlugins()
|
||||
}
|
||||
})
|
||||
if s.runEssentialJobs {
|
||||
s.Go(func() {
|
||||
s.runLicenseExpirationCheckJob()
|
||||
runCheckAdminSupportStatusJob(fakeApp, c)
|
||||
runCheckWarnMetricStatusJob(fakeApp, c)
|
||||
runDNDStatusExpireJob(fakeApp)
|
||||
})
|
||||
s.runJobs()
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user