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

Remove malformed empty page files on access #18401

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

dbw9580
Copy link
Contributor

@dbw9580 dbw9580 commented Nov 8, 2023

What changes are proposed in this pull request?

Remove empty pages when they are accessed by the get page methods. Empty pages except for the vert first page of a file are most likely malformed and are a result of a failed put attempt.

Why are the changes needed?

Reading empty pages causes 0 bytes to be read, and in some cases causing an infinite loop in the caller. When used with getDataFileChannel, it results in the channel to be created multiple times for a given empty page, because the channels are always 0 sized.

Does this PR introduce any user facing changes?

No.

Copy link
Contributor

@JiamingMai JiamingMai left a comment

Choose a reason for hiding this comment

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

LGTM

@JiamingMai JiamingMai added the type-bug This issue is about a bug label Nov 8, 2023
@dbw9580 dbw9580 requested a review from beinan November 8, 2023 13:32
Copy link
Contributor

@beinan beinan left a comment

Choose a reason for hiding this comment

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

I'm good for the fix, but I think we still need to figure out the root cause

@dbw9580
Copy link
Contributor Author

dbw9580 commented Nov 9, 2023

alluxio-bot, merge this please

@alluxio-bot alluxio-bot merged commit 2e1f95d into Alluxio:main Nov 9, 2023
14 checks passed
ssz1997 pushed a commit to ssz1997/alluxio that referenced this pull request Dec 15, 2023
### What changes are proposed in this pull request?

Remove empty pages when they are accessed by the get page methods. Empty pages except for the vert first page of a file are most likely malformed and are a result of a failed put attempt.

### Why are the changes needed?

Reading empty pages causes 0 bytes to be read, and in some cases causing an infinite loop in the caller. When used with `getDataFileChannel`, it results in the channel to be created multiple times for a given empty page, because the channels are always 0 sized.

### Does this PR introduce any user facing changes?

No.

			pr-link: Alluxio#18401
			change-id: cid-fff8f48af3814e3c71317377aa0b065599c06a57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug This issue is about a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants