adoroszlai commented on PR #6742: URL: https://github.com/apache/ozone/pull/6742#issuecomment-2161134888
@ArafatKhan2198 If we always want to check whether pipeline exists before addition, then the check should be performed inside `addPipeline`. The method should be changed to return whether the pipeline was added or not. The caller can then use this information to perform conditional action, e.g. - update pipeline state/timestamp - log the action Benefits: 1. existence is checked atomically with addition 2. existence is checked only once 3. logging etc. are performed without lock -- 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]
