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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java:
##########
@@ -148,6 +148,31 @@ public void ensureContainerNotMissing(long containerId, 
State state) throws Stor
     }
   }
 
+  /**
+   * Fails if the witnessed container DB has an entry for the container: it 
was already created on this datanode,
+   * possibly deleted since, and must not be created again by an ordinary 
create.
+   * @param containerId ID of the container to be created
+   * @throws StorageContainerException with {@code CLOSED_CONTAINER_IO} if 
there is an entry, or with
+   *                                   {@code IO_EXCEPTION} if the entry 
cannot be read
+   */
+  public void ensureContainerNotWitnessed(long containerId) throws 
StorageContainerException {

Review Comment:
   @ptlrs for RECOVERING reconstruction coordinator taken care by passing the 
container creatable flag as false here: 
https://github.com/apache/ozone/pull/10702/changes#diff-6b2bbf61661bc6de5dceb3f2b95ee2a399aededb7919369b7aa5d5cf4b329ac2R235
   
   If write chunk is not a container creatable, then we throw exception right 
away: 
https://github.com/apache/ozone/pull/10702/changes#diff-871e7d74ed720a58cf2d03931044fe46124cc0f7627641e1f5a75a912f282ae9R302



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