You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "advancedxy (via GitHub)" <gi...@apache.org> on 2023/08/04 06:30:11 UTC

[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #1072: [#1071] fix: incorrect capacity check in Server#LocalStorage

advancedxy commented on code in PR #1072:
URL: https://github.com/apache/incubator-uniffle/pull/1072#discussion_r1284034919


##########
storage/src/main/java/org/apache/uniffle/storage/common/LocalStorage.java:
##########
@@ -144,12 +144,23 @@ protected ServerReadHandler newReadHandler(CreateShuffleReadHandlerRequest reque
 
   @Override
   public boolean canWrite() {
+    if (isCorrupted) {
+      return false;
+    }
+    File base = new File(basePath);
+    long used = base.getTotalSpace() - base.getUsableSpace();

Review Comment:
   is this operation I/O involved or has some heavy overhead? 
   
   I'm a bit of concerned of that



-- 
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@uniffle.apache.org

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


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