z-bb commented on PR #5489: URL: https://github.com/apache/ozone/pull/5489#issuecomment-1780289967
> @z-bb Prepare should already be restricted to administrators, but please test to verify. We do this in in [`OzoneManagerStateMachine#preAppendTransaction`](https://github.com/apache/ozone/blob/84fb0b442dcbb8e3e242ac5b43dc769cc087657a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java#L288) because that is where prepare first takes effect to block incoming write requests. I see this isn't clear from the current code, so if you want to update this patch with a comment explaining this instead that may be helpful. Thanks review, I have some question, whether prepare can be executed in non-high-availability mode. If it can be executed, OzoneManagerStateMachine#preAppendTransaction will not be executed, and admin will not be checked. If prepare cannot be executed in non-ha mode, do you need to judge isRatisEnabled? If it is true, an exception will be thrown. Otherwise, the following problems will occur. https://issues.apache.org/jira/browse/HDDS-9532 -- 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]
