errose28 commented on code in PR #7012:
URL: https://github.com/apache/ozone/pull/7012#discussion_r1702016689


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/BlockManagerImpl.java:
##########
@@ -162,6 +150,14 @@ public long persistPutBlock(KeyValueContainer container,
           }
         }
 
+        boolean incrementalEnabled = true;
+        if 
(!VersionedDatanodeFeatures.isFinalized(HDDSLayoutFeature.HBASE_SUPPORT)) {
+          if (isPartialChunkList(data)) {
+            throw new UnsupportedOperationException("DataNode has not 
finalized " +

Review Comment:
   I'm not sure the exception is correct here. On the client side we use the 
unchecked `UnsupportedOperationException` because it OK to crash the client at 
that point. On the server we want to throw an exception type and result code 
that will be translated back to the client. I think this would be 
`StorageContainerException` with a new result code similar to 
`NOT_SUPPORTED_OPERATION_PRIOR_FINALIZATION` which exists on the OM.
   
   Note that there's no tests in the PR. Per the mailing thread it looks like 
we are going to do those after the merge which is ok, but we should try to make 
sure this is working correctly here because I think this is the first time we 
have rejected a request based on a layout version on the datanode.



-- 
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]

Reply via email to