mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-11-23 06:17:57 +08:00
* fix(monitor): demote debug leftovers that were logged as errors Three logging sites emit error-level lines for entirely normal operation, flooding the monitor error log: - EvalContext.GetNewState logs "ruleName:...,since:...,for:..." on every evaluation tick of a rule with For != 0; it is a state-machine trace, not an error (346 lines in one daily report window). - SAlertResource.DetachAlert logs "=====resource ... detach alert ..." on every routine detach (179 lines). - SDataSourceManager.AddSubscription/DropSubscription dump the influx response body with log.Errorln after the query already succeeded; query failures are returned as errors above (seen on every monitor startup). Demote all of them to debug level. * fix(cloudcommon): dedupe lockman background-context warnings checkContext dumped the stacks of every goroutine in the process via debug.PrintStack each time an object was locked with a Background or TODO context. Internal workers (taskman tasks, tickers) legitimately lock without a request context, so a single burst of scheduled tasks produced thousands of full dumps (6,754 stack dumps in one region daily report window, 36 in monitor). Report each distinct locking path once instead, keeping only the current goroutine stack, so the audit hint survives without the flood.