-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix fuse position read bug #17558
Fix fuse position read bug #17558
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this PR fixes the described issue. Can you describe how you debugged the error?
if (totalRead == 0) { | ||
return currentRead; | ||
return totalRead; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the original logic is correct. We must have reached here by breaking out of the above while loop, due to currentRead < 0
. If totalRead == 0
, then it means the very first read call return with EOF, therefore we return currentRead
here to notify the caller.
this is the expected behavior: you cannot read beyond the end of the file. On the other hand, read should return 0 if |
Thanks for reply, this fix may not work, but the position read problem exist any way, can you help to figure out what's going on? I did not follow up this issue in detail. |
Automated checks report:
Some checks failed. Please fix the reported issues and reply 'alluxio-bot, check this please' to re-run checks. |
@bzheng888 I guess you may use a unknown email for this PR |
@bzheng888 looks like the PR-EMAIL failed? Email not linked to a valid Github account |
@bzheng888 can you help create a github issue and link to this PR? |
alluxio-bot, merge this please |
merge failed: |
alluxio-bot, merge this please |
Ok |
What changes are proposed in this pull request?
The position read will return -1 when position >= filesize, then the fuse will throw an error.
/tmp/alluxio-fuse/f1 is a 1mb file.
Why are the changes needed?
Fix the fuse position read bug.
Does this PR introduce any user facing changes?
Please list the user-facing changes introduced by your change, including