ptlrs opened a new pull request, #9948: URL: https://github.com/apache/ozone/pull/9948
## What changes were proposed in this pull request? `ThrottledAsyncChecker#schedule` has two preconditions: Is a check already in progress Was the previous check completed a long time ago If both of these conditions are satisfied then a new check is scheduled. However, consider a case where a check was never run or it was run a long time ago. This situation will satisfy both the preconditions. Now if two threads call the same schedule method for the same target/volume, there will be a race condition and/or undefined behavior. This is because the `checksInProgress` map is updated only towards the end of the method. We cannot simply update the `checksInProgress` at the start of the method as we need the `ListenableFuture` available before we update that map. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-14860 ## How was this patch tested? CI: https://github.com/ptlrs/ozone/actions/runs/23265982507 -- 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]
