Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1111] fix: Shuffle server can not delete remote storage path in security cluster #1122

Merged
merged 9 commits into from
Aug 11, 2023

Conversation

zhengchenyu
Copy link
Collaborator

What changes were proposed in this pull request?

Fix the bug that shuffle server can not delete remote storage path in security hdfs.

Why are the changes needed?

Fix: #1111

How was this patch tested?

unit test and test in cluster.

@jerqi jerqi requested a review from zuston August 8, 2023 14:01
@jerqi
Copy link
Contributor

jerqi commented Aug 8, 2023

@zuston Could you help me review this pr?

@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2023

Codecov Report

Merging #1122 (6fe84dc) into master (8b8801b) will decrease coverage by 2.09%.
Report is 5 commits behind head on master.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1122      +/-   ##
============================================
- Coverage     56.64%   54.56%   -2.09%     
- Complexity     2087     2413     +326     
============================================
  Files           317      351      +34     
  Lines         13782    18463    +4681     
  Branches       1228     1734     +506     
============================================
+ Hits           7807    10074    +2267     
- Misses         5559     7793    +2234     
- Partials        416      596     +180     
Files Changed Coverage Δ
.../org/apache/uniffle/server/ShuffleTaskManager.java 75.88% <100.00%> (-0.42%) ⬇️

... and 75 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jerqi jerqi changed the title [#1111] fix: Shuffle server can not delete remote storage path in sec… [#1111] fix: Shuffle server can not delete remote storage path in security cluster Aug 10, 2023
@@ -649,6 +649,7 @@ public void checkLeakShuffleData() {
public void removeResources(String appId) {
LOG.info("Start remove resource for appId[" + appId + "]");
final long start = System.currentTimeMillis();
String user = getUserByAppId(appId);
Copy link
Contributor

Choose a reason for hiding this comment

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

user may be null some times If app is removed.

Copy link
Collaborator Author

@zhengchenyu zhengchenyu Aug 10, 2023

Choose a reason for hiding this comment

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

user may be null some times If app is removed.

@jerqi
Only next line will remove app from shuffleTaskInfo.
Here I move getUserByAppId before 'shuffleTaskInfos.remove(appId)', or user will be null.
In fact the user in AppPurgeEvent is always null, but is not problem in non security cluster.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the method can handle the null value situation, I'm ok for this change. Let @zuston take another look.

@jerqi
Copy link
Contributor

jerqi commented Aug 10, 2023

@zuston Ping.

Copy link
Member

@zuston zuston left a comment

Choose a reason for hiding this comment

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

From my side, when the user is null, the delete operation still could continue. This limitation could be removed in HadoopSecurityContext . WDYT?

Copy link
Member

@zuston zuston left a comment

Choose a reason for hiding this comment

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

Anyway, this is a good fix. +1 Merged

@zuston zuston merged commit 541d9dc into apache:master Aug 11, 2023
32 checks passed
@zhengchenyu zhengchenyu deleted the branch-1111 branch October 20, 2023 01:54
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.

[Bug] Shuffle server can not delete remote storage path in security cluster.
5 participants