zqr10159 commented on PR #4273: URL: https://github.com/apache/hertzbeat/pull/4273#issuecomment-5127715085
There is still a concurrency hole in the auto-created-monitor cap. `containsKey`/`size` is checked before `computeIfAbsent`; multiple new job/instance keys can all observe capacity and then insert, exceeding the configured maximum. The current tests exercise sequential calls only. Please make reservation atomic (for example with a semaphore/explicit reservation or a truly bounded cache) and add a concurrent burst test that proves the map never exceeds the cap. The request-body and sample-count limits are still useful independently. -- 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]
