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

[ISSUE-369] Don't throw exception if blocks are corrupted but have multi replicas #374

Merged
merged 3 commits into from
Nov 29, 2022

Conversation

xianjingfeng
Copy link
Member

What changes were proposed in this pull request?

Don't throw exception if blocks are corrupted but have multi replicas

Why are the changes needed?

If some blocks of one replica are corrupted, maybe other replicas are not corrupted, so exception should not be thrown here if blocks have multi replicas. #369

Does this PR introduce any user-facing change?

No

How was this patch tested?

UT

@@ -82,6 +83,7 @@ public ShuffleReadClientImpl(
this.blockIdBitmap = blockIdBitmap;
this.taskIdBitmap = taskIdBitmap;
this.idHelper = idHelper;
this.shuffleServerInfoList = shuffleServerInfoList;
Copy link
Contributor

Choose a reason for hiding this comment

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

The size of shuffleServerInfoList will always be one because we use MultiReplicaReadHandler.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, shuffleServerInfoList has not be modified. You can check it again.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, my mistake.

if (expectedCrc != actualCrc) {
String errMsg = "Unexpected crc value for blockId[" + bs.getBlockId()
+ "], expected:" + expectedCrc + ", actual:" + actualCrc;
if (shuffleServerInfoList.size() > 1) {
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 add some comments here?

@jerqi jerqi changed the title Don't throw exception if blocks are corrupted but have multi replicas [ISSUE-369] Don't throw exception if blocks are corrupted but have multi replicas Nov 29, 2022
@jerqi jerqi linked an issue Nov 29, 2022 that may be closed by this pull request
3 tasks
@jerqi
Copy link
Contributor

jerqi commented Nov 29, 2022

LGTM, just some nits.

@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2022

Codecov Report

Merging #374 (efc23fc) into master (ad51341) will decrease coverage by 0.15%.
The diff coverage is 85.00%.

@@             Coverage Diff              @@
##             master     #374      +/-   ##
============================================
- Coverage     58.01%   57.85%   -0.16%     
- Complexity     1361     1369       +8     
============================================
  Files           171      171              
  Lines          9006     9053      +47     
  Branches        787      794       +7     
============================================
+ Hits           5225     5238      +13     
- Misses         3449     3482      +33     
- Partials        332      333       +1     
Impacted Files Coverage Δ
...che/uniffle/client/impl/ShuffleReadClientImpl.java 88.46% <85.00%> (-1.23%) ⬇️
...pache/uniffle/server/ShuffleServerGrpcService.java 0.81% <0.00%> (-0.02%) ⬇️
.../org/apache/uniffle/server/ShuffleTaskManager.java 77.22% <0.00%> (ø)
...e/uniffle/client/factory/ShuffleClientFactory.java 0.00% <0.00%> (ø)
...uniffle/storage/factory/ShuffleHandlerFactory.java 0.00% <0.00%> (ø)
...client/request/CreateShuffleReadClientRequest.java 0.00% <0.00%> (ø)
.../storage/handler/impl/MemoryClientReadHandler.java 0.00% <0.00%> (ø)
...orage/request/CreateShuffleReadHandlerRequest.java 0.00% <0.00%> (ø)
...he/uniffle/server/buffer/ShuffleBufferManager.java 82.67% <0.00%> (+0.06%) ⬆️
... and 2 more

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

jerqi
jerqi previously approved these changes Nov 29, 2022
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, wait for CI, thanks @xianjingfeng

@jerqi jerqi merged commit c503f8f into apache:master Nov 29, 2022
@xianjingfeng xianjingfeng deleted the issue_369 branch August 9, 2024 06:46
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.

[Improvement] Exception should not be thrown if some blocks are corrupted
3 participants