-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix panic #16776
fix panic #16776
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨
|
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue ##16724
#16752
What this PR does / why we need it:
修改在mo server还未启动时metric就开始执行的时序问题。
PR Type
Bug fix, Enhancement
Description
NullResp
methods by adding mutex locking.cmd/mo-service/main.go
for consistency.Changes walkthrough 📝
main.go
Ensure metrics initialization waits for server start
cmd/mo-service/main.go
mometric.WithFrontendServerStarted
toInitMetric
call.server.go
Track and check MO server start state
pkg/frontend/server.go
moServerStarted
atomic boolean to track server start state.Start
method to setmoServerStarted
to true upon successfulstart.
MoServerIsStarted
andsetMoServerStarted
functions.cron_task.go
Ensure storage usage calculation waits for server start
pkg/util/metric/mometric/cron_task.go
frontendServerStarted
function to check server start state.CalculateStorageUsage
to wait for server start.metric.go
Add frontend server start check to metric options
pkg/util/metric/mometric/metric.go
frontendServerStarted
toInitOptions
.WithFrontendServerStarted
option to setfrontendServerStarted
.resp_client.go
Add thread safety to `NullResp` methods
pkg/frontend/resp_client.go
NullResp
methods for thread safety.