Duansg opened a new pull request, #3879:
URL: https://github.com/apache/hertzbeat/pull/3879

   ## What's changed?
   
   Resolving the issue where `Monitor Historical Chart Detail` gets stuck 
during parsing and causes CPU utilization to max out when dealing with a large 
number of metrics.
   <img width="1508" height="862" alt="monitor_error" 
src="https://github.com/user-attachments/assets/c02af63e-c9a5-4937-a6cf-9dfdf623bdb1";
 />
   <img width="1476" height="753" alt="cpu_error" 
src="https://github.com/user-attachments/assets/f4acb568-2321-4d7a-9a68-a338588e6a7d";
 />
   
   **Cause of the issue:** 
       When monitoring metrics contain large volumes of data, the front-end 
worker enters an infinite loop while assigning random colors to each curve. It 
attempts to find unused colors, but the color pool has been exhausted.
   
   **Fix Details:** 
       Added a default retry limit (3 attempts) to the color allocation loop. 
If no unused colors are found, existing colors will be reused to prevent 
workers from getting stuck.
       
   <img width="1508" height="816" alt="success" 
src="https://github.com/user-attachments/assets/1a723e31-9f69-4588-9588-794de730a409";
 />
   
   
   ## Checklist
   
   - [x]  I have read the [Contributing 
Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide)
   - [ ]  I have written the necessary doc or comment.
   - [ ]  I have added the necessary unit tests and all cases have passed.
   
   ## Add or update API
   
   - [ ] I have added the necessary [e2e 
tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have 
passed.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to