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

Use generic Exception to catch all exceptions in getStatus() #18398

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

huanghua78
Copy link
Contributor

Also print file path in getStatus() exception on client side

What changes are proposed in this pull request?

Use generic Exception to catch all exceptions in getStatus(), just like that in all other handlers.
File path will be included in log message for getStatus().

Why are the changes needed?

Sometimes, exceptions are thrown in under file system and/or other third-party libraries.
We don't know the exact type of the specific exceptions. If they are not caught, client will
report unknown exceptions in logs. This is misleading.

Does this PR introduce any user facing changes?

Client will show logs with detailed exception information if there is any.
For getStatus(), file path will also be shown in log.

Print file path in getStatus() exception on client side

Signed-off-by: Huang Hua <huanghua78@msn.com>
Copy link
Contributor

@Jackson-Wang-7 Jackson-Wang-7 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Huang Hua <huanghua78@msn.com>
@huanghua78
Copy link
Contributor Author

alluxio-bot, merge this please.

@alluxio-bot
Copy link
Contributor

merge failed:
Merge refused because pull request does not have label start with type-

@huanghua78 huanghua78 added the type-bug This issue is about a bug label Nov 8, 2023
@huanghua78
Copy link
Contributor Author

alluxio-bot, merge this please.

@alluxio-bot alluxio-bot merged commit 6dc2fae into Alluxio:main Nov 8, 2023
14 checks passed
ssz1997 pushed a commit to ssz1997/alluxio that referenced this pull request Dec 15, 2023
Also print file path in getStatus() exception on client side

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

Use generic Exception to catch all exceptions in getStatus(), just like that in all other handlers.
File path will be included in log message for getStatus().

### Why are the changes needed?

Sometimes, exceptions are thrown in under file system and/or other third-party libraries.
We don't know the exact type of the specific exceptions. If they are not caught, client will
report unknown exceptions in logs. This is misleading. 

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

Client will show logs with detailed exception information if there is any.
For getStatus(), file path will also be shown in log.

			pr-link: Alluxio#18398
			change-id: cid-b6acee3dd0c3e2e03e66bbf195cbda1e95f6bf64
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.

3 participants