errose28 commented on code in PR #7013:
URL: https://github.com/apache/ozone/pull/7013#discussion_r1700421630
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java:
##########
@@ -545,22 +545,34 @@ public static OMRequest
blockCommitKeyWithBucketLayoutFromOldClient(
return req;
}
+ /**
+ * Validates key commit requests.
+ * We do not want to allow clients to perform hsync or lease recovery
requests
+ * until the cluster has finalized the HBase support feature.
+ *
+ * @param req - the request to validate
+ * @param ctx - the validation context
+ * @return the validated request
+ * @throws OMException if the request is invalid
+ */
@RequestFeatureValidator(
conditions = ValidationCondition.CLUSTER_NEEDS_FINALIZATION,
processingPhase = RequestProcessingPhase.PRE_PROCESS,
requestType = Type.CommitKey
)
- public static OMRequest disallowHsync(
+ public static OMRequest disallowHBase(
OMRequest req, ValidationContext ctx) throws OMException {
if (!ctx.versionManager()
- .isAllowed(OMLayoutFeature.HSYNC)) {
+ .isAllowed(OMLayoutFeature.HBASE_SUPPORT)) {
Review Comment:
Hsync has also already been finalized on master. Can we leave the original
validator and have this one just for the recovery flag?
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMRecoverLeaseRequest.java:
##########
@@ -101,6 +103,7 @@ public OMRecoverLeaseRequest(OMRequest omRequest) {
}
@Override
+ @DisallowedUntilLayoutVersion(HBASE_SUPPORT)
Review Comment:
`OMRecoverLeaseRequest` is already on master. Disabling it here would
actually be a step backwards. What are we trying to prevent in this case?
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/upgrade/OMLayoutFeature.java:
##########
@@ -44,7 +44,8 @@ public enum OMLayoutFeature implements LayoutFeature {
FILESYSTEM_SNAPSHOT(5, "Ozone version supporting snapshot"),
- QUOTA(6, "Ozone quota re-calculate");
+ QUOTA(6, "Ozone quota re-calculate"),
+ HBASE_SUPPORT(7, "Full support of hsync for HBase");
Review Comment:
+1 a description of what actually changed in the metadata would be helpful
--
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]