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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java:
##########
@@ -404,10 +441,11 @@ private boolean removeContainer(long containerId, boolean 
markMissing, boolean r
     }
   }
 
-  private void deleteFromContainerTable(long containerId) throws 
StorageContainerException {
+  private void markDeletedInContainerTable(long containerId) throws 
StorageContainerException {
     if (null != containerMetadataStore) {
       try {
-        
containerMetadataStore.getContainerCreateInfoTable().delete(ContainerID.valueOf(containerId));
+        
containerMetadataStore.getContainerCreateInfoTable().put(ContainerID.valueOf(containerId),
+            ContainerCreateInfo.valueOf(State.DELETED, INVALID_REPLICA_INDEX));
       } catch (IOException e) {
         throw new StorageContainerException(e, 
ContainerProtos.Result.IO_EXCEPTION);

Review Comment:
   I think altering container delete order of operations is beyond the scope of 
this PR. The actual fix here is minimal within 
`KeyValueHandler#deleteInternal`: Give the exception a more general "failed to 
delete container" message instead of "failed to move container" and chain the 
original exception stored in `ioe` instead of discarding it.



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