Write logs to oom report

This commit is contained in:
世界
2026-08-30 17:41:41 +08:00
parent 2d581b35f3
commit 98512fc8f6
5 changed files with 51 additions and 15 deletions
+1 -3
View File
@@ -117,9 +117,7 @@ func (s *Service) writeOOMDraft(memoryUsage uint64) {
if time.Duration(now-lastDraft) < oomDraftMinInterval {
return
}
if !s.lastDraftTime.CompareAndSwap(lastDraft, now) {
return
}
s.lastDraftTime.Store(now)
reporter := service.FromContext[OOMReporter](s.ctx)
if reporter == nil {
return