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

[#1358] fix(spark): pre-check bytebuffer whether is direct before uncompress #1360

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

zuston
Copy link
Member

@zuston zuston commented Dec 8, 2023

What changes were proposed in this pull request?

precheck bytebuffer whether is direct before uncompress, and rebuild the temp bytebuffer.

Why are the changes needed?

For #1358 . But this PR is not the fundamental solution

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing tests.

@zuston
Copy link
Member Author

zuston commented Dec 8, 2023

PTAL @leixm

@leixm
Copy link
Contributor

leixm commented Dec 8, 2023

Can you explain why the original code fails to make the ByteBuffer consistent?

@zuston
Copy link
Member Author

zuston commented Dec 8, 2023

Can you explain why the original code fails to make the ByteBuffer consistent?

I haven't found the root cause, but I think the bug is related with the nioBuffer() .

Anyway, this PR is to use workaround to fix this. But we still need to dig this more.

@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2023

Codecov Report

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

Comparison is base (453e6d6) 53.27% compared to head (1f8d253) 54.11%.
Report is 7 commits behind head on master.

Files Patch % Lines
...e/spark/shuffle/reader/RssShuffleDataIterator.java 11.11% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1360      +/-   ##
============================================
+ Coverage     53.27%   54.11%   +0.84%     
- Complexity     2712     2715       +3     
============================================
  Files           418      398      -20     
  Lines         23913    21568    -2345     
  Branches       2043     2045       +2     
============================================
- Hits          12739    11672    -1067     
+ Misses        10388     9180    -1208     
+ Partials        786      716      -70     

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

@jerqi
Copy link
Contributor

jerqi commented Dec 8, 2023

Maybe index BytBbuffer and data ByteBuffer have different types.

@zuston
Copy link
Member Author

zuston commented Dec 8, 2023

Maybe index BytBbuffer and data ByteBuffer have different types.

I think no. The possible point has been attached in the issue. nioBuffer() may be the root cause. .

And I hope this PR could be merged into the master to prevent the ZSTD error ASSP. And also this should be merged into the 0.8.1 version.

@apache apache deleted a comment from qqqttt123 Dec 8, 2023
@jerqi
Copy link
Contributor

jerqi commented Dec 8, 2023

cc @LuciferYang Could you give us some advice?

@zuston zuston requested review from jerqi and leixm December 11, 2023 02:56
@zuston zuston requested review from LuciferYang and jerqi December 18, 2023 02:56
@zuston
Copy link
Member Author

zuston commented Dec 18, 2023

PTAL again @jerqi @LuciferYang

@LuciferYang
Copy link
Contributor

+1 from myside

@zuston zuston merged commit 56490d4 into apache:master Dec 19, 2023
36 checks passed
@zuston
Copy link
Member Author

zuston commented Dec 19, 2023

Thanks for your review @jerqi @LuciferYang , Merged.

zuston added a commit to zuston/incubator-uniffle that referenced this pull request Jan 18, 2024
…re uncompress (apache#1360)

### What changes were proposed in this pull request?

precheck bytebuffer whether is direct before uncompress, and rebuild the temp bytebuffer.

### Why are the changes needed?

For apache#1358 . But this PR is not the fundamental solution

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing tests.
rickyma added a commit to rickyma/incubator-uniffle that referenced this pull request Feb 27, 2024
rickyma added a commit to rickyma/incubator-uniffle that referenced this pull request Feb 27, 2024
jerqi pushed a commit that referenced this pull request Feb 27, 2024
…#1547)

### What changes were proposed in this pull request?

NPE cound happen before uncompressing after #1360 

### Why are the changes needed?

For #1546

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing UTs.
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.

5 participants