Skip to content

Conversation

@zuston
Copy link
Member

@zuston zuston commented Jul 29, 2022

What changes were proposed in this pull request?

Ignore partial failure on initializing local storage in shuffle server side

Why are the changes needed?

When setting multiple storage paths, only one disk is insufficient capacity, shuffle server will directly throw exception. We hope it can be ignored, because bad disks are more common in production environments

Does this PR introduce any user-facing change?

No

How was this patch tested?

UT

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2022

Codecov Report

Merging #102 (1488be2) into master (4e4b940) will increase coverage by 0.09%.
The diff coverage is 90.47%.

@@             Coverage Diff              @@
##             master     #102      +/-   ##
============================================
+ Coverage     56.45%   56.55%   +0.09%     
- Complexity     1182     1183       +1     
============================================
  Files           149      149              
  Lines          8008     8019      +11     
  Branches        767      767              
============================================
+ Hits           4521     4535      +14     
+ Misses         3243     3241       -2     
+ Partials        244      243       -1     
Impacted Files Coverage Δ
...rg/apache/uniffle/storage/common/LocalStorage.java 44.68% <0.00%> (ø)
...he/uniffle/server/storage/LocalStorageManager.java 61.90% <88.88%> (+5.90%) ⬆️
...a/org/apache/uniffle/server/ShuffleServerConf.java 99.15% <100.00%> (+0.02%) ⬆️
...e/uniffle/server/storage/SingleStorageManager.java 65.57% <0.00%> (-1.64%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us.

assertEquals(2, localStorageManager.getStorages().size());
}

public static class MockedLocalStorageBuilder extends LocalStorage.Builder {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use a path which don't exist instead of MockedLocalStorageBuilder? Such as we use a path named /xxx/yyy, but /xxx don't exist.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.
But i can't understand why this mockBuilder is not appropriate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. But i can't understand why this mockBuilder is not appropriate.

The Builder some fields and method become protected. I feel it's not necessary.

Copy link
Member Author

@zuston zuston Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the public modifier is not appropriate, i could change to protected. And provide a method of getBasePath().
What do u think so?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Remove this class @jerqi

LOGGER.error("Initializing the storage path of {} failed.", storagePath, exception);
}
}
if (localStorages.size() <= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we introduce a configOption that if the broken disks are more than the value, the start shuffle will fail to start.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense.

zuston added 2 commits July 29, 2022 17:21
…ng multiple local storage paths in shuffle server client
}

localStorages = Arrays.asList(localStorageArray);
localStorages = Arrays.stream(localStorageArray).filter(Objects::nonNull).collect(Collectors.toList());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the bug introduced by #72 .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For #72, it's not a bug.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The localStorageArray maybe exist the null in some index, this will make the localStorages exist the null element when using the Arrays.asList(localStorageArray)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, my fault. Ignore this

}

localStorages = Arrays.asList(localStorageArray);
localStorages = Arrays.stream(localStorageArray).filter(Objects::nonNull).collect(Collectors.toList());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For #72, it's not a bug.

// ignore
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a new line? Because there are a warning if we don't have a newline at the end of the file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@jerqi jerqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants