adoroszlai commented on code in PR #7845:
URL: https://github.com/apache/ozone/pull/7845#discussion_r1953341170
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/AbstractOMKeyDeleteResponse.java:
##########
@@ -43,30 +43,14 @@
@CleanupTableInfo(cleanupTables = {DELETED_TABLE})
public abstract class AbstractOMKeyDeleteResponse extends OmKeyResponse {
- private boolean isRatisEnabled;
-
public AbstractOMKeyDeleteResponse(
- @Nonnull OMResponse omResponse, boolean isRatisEnabled) {
-
+ @Nonnull OMResponse omResponse) {
super(omResponse);
- this.isRatisEnabled = isRatisEnabled;
}
- public AbstractOMKeyDeleteResponse(@Nonnull OMResponse omResponse,
- boolean isRatisEnabled, BucketLayout bucketLayout) {
-
- super(omResponse, bucketLayout);
- this.isRatisEnabled = isRatisEnabled;
- }
-
- /**
- * For when the request is not successful.
- * For a successful request, the other constructor should be used.
- */
public AbstractOMKeyDeleteResponse(@Nonnull OMResponse omResponse,
@Nonnull BucketLayout bucketLayout) {
super(omResponse, bucketLayout);
- checkStatusNotOK();
Review Comment:
Yes, related.
The patch removes the parameter `isRatisEnabled` from the other, "OK"
constructor. Now we would have two constructors with the same signature, which
is not possible. So effectively we remove the constructor that had
`isRatisEnabled`, and the status check from this constructor, which is no
longer preserved for the "notOK" scenario.
Same check is added in subclasses, where constructors are still
distinguished for success and failure case.
--
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]