You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/08/15 15:04:43 UTC

[GitHub] [ozone] Galsza opened a new pull request, #3684: HDDS-7076. Log container file path when container cannot be written.

Galsza opened a new pull request, #3684:
URL: https://github.com/apache/ozone/pull/3684

   ## What changes were proposed in this pull request?
   
   Add container file path to error message when writing to container encounters an error
   
   ## What is the link to the Apache JIRA
   
   [HDDS-7076](https://issues.apache.org/jira/browse/HDDS-7076)
   
   ## How was this patch tested?
   
   Reproduce the error on a local cluster via taking away the write permission on container data by making its folder read only.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Galsza commented on a diff in pull request #3684: HDDS-7076. Log container file path when container cannot be written.

Posted by GitBox <gi...@apache.org>.
Galsza commented on code in PR #3684:
URL: https://github.com/apache/ozone/pull/3684#discussion_r946484325


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java:
##########
@@ -260,7 +260,8 @@ private void writeToContainerFile(File containerFile, boolean isCreate)
     } catch (IOException ex) {
       onFailure(containerData.getVolume());
       throw new StorageContainerException("Error while creating/ updating " +
-          ".container file. ContainerID: " + containerId, ex,
+          ".container file. ContainerID: " + containerId + " Container path: " +

Review Comment:
   Thanks for spotting this, I've fixed 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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a diff in pull request #3684: HDDS-7076. Log container file path when container cannot be written.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on code in PR #3684:
URL: https://github.com/apache/ozone/pull/3684#discussion_r946867224


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java:
##########
@@ -260,7 +260,8 @@ private void writeToContainerFile(File containerFile, boolean isCreate)
     } catch (IOException ex) {
       onFailure(containerData.getVolume());
       throw new StorageContainerException("Error while creating/ updating " +
-          ".container file. ContainerID: " + containerId, ex,
+          " container file. ContainerID: " + containerId +
+          " ,container path: " + containerFile.getAbsolutePath(), ex,

Review Comment:
   Note that error may happen for temp file (lines 246-248) or final file (lines 254, 256-257).  Can we distinguish between those two cases?
   
   Also, spacing is a bit odd here (some double, some missing).  How about:
   
   ```java
         throw new StorageContainerException("Error while creating/updating" +
             " container file. ContainerID: " + containerId +
             ", container path: " + containerFile.getAbsolutePath(), ex,
   ```



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] duongnguyen0 commented on a diff in pull request #3684: HDDS-7076. Log container file path when container cannot be written.

Posted by GitBox <gi...@apache.org>.
duongnguyen0 commented on code in PR #3684:
URL: https://github.com/apache/ozone/pull/3684#discussion_r945912869


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java:
##########
@@ -260,7 +260,8 @@ private void writeToContainerFile(File containerFile, boolean isCreate)
     } catch (IOException ex) {
       onFailure(containerData.getVolume());
       throw new StorageContainerException("Error while creating/ updating " +
-          ".container file. ContainerID: " + containerId, ex,
+          ".container file. ContainerID: " + containerId + " Container path: " +

Review Comment:
   ```suggestion
             " container file. ContainerID: " + containerId + ", container path: " +
   ```



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai merged pull request #3684: HDDS-7076. Log container file path when container cannot be written.

Posted by GitBox <gi...@apache.org>.
adoroszlai merged PR #3684:
URL: https://github.com/apache/ozone/pull/3684


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] duongnguyen0 commented on pull request #3684: HDDS-7076. Log container file path when container cannot be written.

Posted by GitBox <gi...@apache.org>.
duongnguyen0 commented on PR #3684:
URL: https://github.com/apache/ozone/pull/3684#issuecomment-1215267464

   Thanks for the patch @Galsza. LGTM, just one nitpicking comment inline. 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on pull request #3684: HDDS-7076. Log container file path when container cannot be written.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on PR #3684:
URL: https://github.com/apache/ozone/pull/3684#issuecomment-1219402842

   Thanks @Galsza for updating the patch.  Thanks @duongnguyen0 for the review.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Galsza commented on a diff in pull request #3684: HDDS-7076. Log container file path when container cannot be written.

Posted by GitBox <gi...@apache.org>.
Galsza commented on code in PR #3684:
URL: https://github.com/apache/ozone/pull/3684#discussion_r948828373


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java:
##########
@@ -260,7 +260,8 @@ private void writeToContainerFile(File containerFile, boolean isCreate)
     } catch (IOException ex) {
       onFailure(containerData.getVolume());
       throw new StorageContainerException("Error while creating/ updating " +
-          ".container file. ContainerID: " + containerId, ex,
+          " container file. ContainerID: " + containerId +
+          " ,container path: " + containerFile.getAbsolutePath(), ex,

Review Comment:
   Added additional text when the temp file could not be created. I'm not sure what else we can do with this situation. 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] errose28 commented on a diff in pull request #3684: HDDS-7076. Log container file path when container cannot be written.

Posted by GitBox <gi...@apache.org>.
errose28 commented on code in PR #3684:
URL: https://github.com/apache/ozone/pull/3684#discussion_r946114831


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java:
##########
@@ -260,7 +260,8 @@ private void writeToContainerFile(File containerFile, boolean isCreate)
     } catch (IOException ex) {
       onFailure(containerData.getVolume());
       throw new StorageContainerException("Error while creating/ updating " +
-          ".container file. ContainerID: " + containerId, ex,
+          ".container file. ContainerID: " + containerId + " Container path: " +

Review Comment:
   I think the `.` was originally there to signify the file extension of the file is `.container`. I don't think it matters either way, just a note.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on pull request #3684: HDDS-7076. Log container file path when container cannot be written.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on PR #3684:
URL: https://github.com/apache/ozone/pull/3684#issuecomment-1218213315

   @Galsza Please try to avoid force-push when updating the PR.  Here are some great articles that explain why:
   
   https://developers.mattermost.com/blog/submitting-great-prs/#4-avoid-force-pushing
   https://www.freecodecamp.org/news/optimize-pull-requests-for-reviewer-happiness#request-a-review


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org