ashishkumar50 commented on code in PR #7981:
URL: https://github.com/apache/ozone/pull/7981#discussion_r1984476824


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/SendContainerRequestHandler.java:
##########
@@ -110,32 +119,44 @@ public void onNext(SendContainerRequest req) {
 
   @Override
   public void onError(Throwable t) {
-    LOG.warn("Error receiving container {} at {}", containerId, nextOffset, t);
-    closeOutput();
-    deleteTarball();
-    responseObserver.onError(t);
+    try {
+      LOG.warn("Error receiving container {} at {}", containerId, nextOffset, 
t);
+      closeOutput();
+      deleteTarball();
+      responseObserver.onError(t);
+    } finally {
+      if (volume != null) {
+        
volume.incImportContainerCommitBytes(-importer.getDefaultContainerSize() * 2);

Review Comment:
   Which failure case? If volume is not assigned i am marking it as null, so 
that in error it will not be decremented..If volume is assigned it means space 
is reserved for 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