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

Keep backend running when exceptions occur #143

Merged
merged 4 commits into from
Mar 5, 2020
Merged

Keep backend running when exceptions occur #143

merged 4 commits into from
Mar 5, 2020

Conversation

tracyhenry
Copy link
Owner

Previously, the backend will throw up whenever there is an exception. The user has to kill docker containers, restart and face possibly corrupted database stuff. This issue has been tracked in #15

This PR addresses this issue by placing try/catches in high-level places to catch all possible exceptions. A helper message like the following is printed out after the exception's stack trace:

+---------------------------------------------------------+
|ERROR!!! An exception occurred while indexing.           |
|This is likely due to errors in database related things, |
|e.g. a mis-formed SQL query in the specification, a non- |
|existent column you specified, or the data isn't loaded  |
|into the database.                                       |
|                                                         |
|Indexing is now terminated and the server is restarted.  |
|Please inspect your spec and database, and then recompile|
|the project.If you can't figure out the issue, feel free |
|to contact Kyrix maintainers.                            |
|                                                         |
|Github: https://github.com/tracyhenry/kyrix              |
+---------------------------------------------------------+

Then, backend state is cleaned up and server is restarted. The user is then able to iteratively refine their spec without stopping docker at all.

Since #15 is also about checking SQL function/JS script securities (e.g. no DDL, DML), we'll leave it open.

This PR also has a fix to Kyrix-S which parses double values from strings more robustly.

@tracyhenry tracyhenry merged commit dbf8068 into master Mar 5, 2020
@tracyhenry tracyhenry deleted the try-catch branch March 5, 2020 01:25
ericazhou7 pushed a commit to ericazhou7/Kyrix that referenced this pull request Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant