Cyanty opened a new pull request, #3660: URL: https://github.com/apache/hertzbeat/pull/3660
## What's changed? **Optimize the scheduling logic for batch flush tasks** To improve system write performance and stability by optimizing the small tasks that are generated when the buffer queue triggers an overflow (at 80%), which can lead to a large number of inefficient, small-batch insert tasks. - Add a non-blocking CAS check to acquire execution rights, reducing the multiple triggering of small tasks. - In the `buffer size` triggered operation, prioritize the clearing of the buffer queue to reduce the occurrences of the "buffer queue is full" state and "overflow triggers". - Isolate the `flush interval` and `buffer size` operations to prevent the size-based operation from additionally triggering the scheduling of the next interval-based flush task. ## Checklist - [x] I have read the [Contributing Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide) - [x] I have written the necessary doc or comment. - [x] 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]
