Duansg commented on PR #3673:
URL: https://github.com/apache/hertzbeat/pull/3673#issuecomment-3235918509

   Hi, @bigcyy by the way, here are some suggestions you might find helpful:
   
   1. Optimization: Currently, entering an excessively large value in the page 
settings window triggers an error due to missing validation here.
   2. Recommendation: Limit the window size (`windowSizeMs`). Currently, it 
appears to accept the maximum value for an int. Setting the window size 
excessively large not only increases memory pressure but may also result in a 
large number of "lively" windows persisting in the system. This could 
subsequently impact the processing efficiency of `onWatermark`.
   3. Recommendation: Limit the size of `activeWindows`. In certain scenarios 
(e.g., a large number of distinct `alertDefine` instances or extremely large 
window size settings), `activeWindows` may grow excessively large, potentially 
leading to memory leaks in extreme cases.
   4. Recommendations: Implement fault tolerance or 
[monitoring](https://github.com/apache/hertzbeat/pull/3641) for certain 
critical resource usage. For example, in the processing logic of 
`org.apache.hertzbeat.alert.calculate.realtime.window.AlarmEvaluator#workerExecutor`,
 if rejected, it may result in the loss of entire window data, and I cannot 
dynamically adjust the thread pool size.


-- 
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