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

[MINOR] refactor: Avoid unnecessary recursion #1441

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

EnricoMi
Copy link
Contributor

@EnricoMi EnricoMi commented Jan 11, 2024

What changes were proposed in this pull request?

Change the recursion of ShuffleReadClientImpl.readShuffleBlockData into an outer while(true) loop. Diff is best compared with whitespaces ignored.

Why are the changes needed?

The recursion in ShuffleReadClientImpl.readShuffleBlockData is not needed because the existing return statements also terminate the introduced outer loop. The recursion depth is limited by the number of consecutive empty segments.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Not tested.

Copy link
Member

@xianjingfeng xianjingfeng left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @EnricoMi

@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (5d027c0) 53.38% compared to head (95eafb7) 54.29%.

Files Patch % Lines
...che/uniffle/client/impl/ShuffleReadClientImpl.java 92.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1441      +/-   ##
============================================
+ Coverage     53.38%   54.29%   +0.91%     
  Complexity     2729     2729              
============================================
  Files           422      402      -20     
  Lines         24046    21685    -2361     
  Branches       2051     2051              
============================================
- Hits          12836    11774    -1062     
+ Misses        10412     9184    -1228     
+ Partials        798      727      -71     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xianjingfeng xianjingfeng merged commit 051b07a into apache:master Jan 12, 2024
36 checks passed
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