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

[Improvement] Improve the thrown exception in EntityStore #3976

Closed
jerryshao opened this issue Jun 26, 2024 · 5 comments · Fixed by #3979
Closed

[Improvement] Improve the thrown exception in EntityStore #3976

jerryshao opened this issue Jun 26, 2024 · 5 comments · Fixed by #3979
Assignees
Labels
0.6.0 Release v0.6.0 improvement Improvements on everything

Comments

@jerryshao
Copy link
Contributor

What would you like to be improved?

Currently, there're several misuse of exception in entity store.

image

In put method, we use EntityAlreadyExistsException but in update we use AlreadyExistsException, we should unify to use EntityAlreadyExistsException.

in relation storage backend.

image image
  1. We also use AlreadyExistsException, this should be changed to EntityAlreadyExistsException, otherwise this exception will be leaked.
  2. Instead of using GravitinoRuntimeException, we should use IOException instead to avoid exception leakage and conform to the interface definition.

How should we improve?

No response

@jerryshao jerryshao added the improvement Improvements on everything label Jun 26, 2024
@jerryshao
Copy link
Contributor Author

@yuqi1129 @xloya please take a look when you have time.

@yuqi1129 yuqi1129 self-assigned this Jun 26, 2024
@xloya
Copy link
Contributor

xloya commented Jun 27, 2024

@yuqi1129 Would you work on this issue?

@yuqi1129
Copy link
Contributor

Yeah, I would like to do it.

@yuqi1129
Copy link
Contributor

yuqi1129 commented Jun 27, 2024

@xloya, as I may start this next week, please let me know if you plan to work on it. Thanks.

@yuqi1129 yuqi1129 removed their assignment Jun 27, 2024
@xloya
Copy link
Contributor

xloya commented Jun 27, 2024

@yuqi1129 Sure, I'd like to do this today.

jerryshao pushed a commit that referenced this issue Jun 28, 2024
…tore (#3979)

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

Improve the throwing behavior of some SQL exceptions in EntityStore.

### Why are the changes needed?

Fix: #3976 

### How was this patch tested?

Through the existing tests.

Co-authored-by: xiaojiebao <xiaojiebao@xiaomi.com>
@jerryshao jerryshao added the 0.6.0 Release v0.6.0 label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.6.0 Release v0.6.0 improvement Improvements on everything
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants