-
Notifications
You must be signed in to change notification settings - Fork 143
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
[Bug] Assertions will not take effect during production runtime #1668
Comments
rickyma
added a commit
to rickyma/incubator-uniffle
that referenced
this issue
Jun 17, 2024
rickyma
added a commit
to rickyma/incubator-uniffle
that referenced
this issue
Jun 17, 2024
rickyma
added a commit
to rickyma/incubator-uniffle
that referenced
this issue
Jun 18, 2024
rickyma
added a commit
to rickyma/incubator-uniffle
that referenced
this issue
Jun 18, 2024
rickyma
added a commit
that referenced
this issue
Jun 24, 2024
### What changes were proposed in this pull request? Replace assertions with exception-throwing codes to make them work in production. ### Why are the changes needed? For: #1668. This will make the exception checks work and make the code more reliable. ### 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
Code of Conduct
Search before asking
Describe the bug
We have many assertions in our code, and these will only take effect when running test cases because the
-ea
parameter is enabled when running tests. However, they will not take effect in actual production because we do not include the-ea
parameter in the startup arguments, and enabling assertions can also impact performance, so it is not recommended to enable them. We should refactor them, maybe replacing these assertions with exception-throwing methods.This allows us to promptly detect some errors that have not been checked currently, making these exception checks work. This will make the code more reliable when running in prod.
Affects Version(s)
master
Uniffle Server Log Output
No response
Uniffle Engine Log Output
No response
Uniffle Server Configurations
No response
Uniffle Engine Configurations
No response
Additional context
No response
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: