-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(core): table suspension reason in wal_tables() and warnings endpoint #4607
Conversation
can we add a SQL function, which would suspend any table with the given message and error code? Otherwise UX is very hard to test. We already have a debug function, such as |
added a new ALTER command to suspend tables. |
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.
Looks good to me, checked the new syntax/functions, and that the config option works.
...src/main/java/io/questdb/griffin/engine/functions/catalogue/WalTableListFunctionFactory.java
Show resolved
Hide resolved
[PR Coverage check]😍 pass : 252 / 284 (88.73%) file detail
|
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.
Looks good!
Thank you for the review! |
required by https://github.com/questdb/questdb-enterprise/pull/439 and questdb/ui#291
Adds two new columns to the output of
wal_tables()
: errorTag, errorMessageThese columns are populated only if the table is suspended.
They help to identify the reason of the table suspension.
errorMessage - the error message logged by QuestDB
errorTag - identifies the type of error, such as
DISK FULL
orTOO MANY OPEN FILES
The error tag will help the Web Console to direct the user to a page with instructions how to resolve the issue.
Also adds a new endpoint:
/warnings
.This returns with a json object containing server configuration issues.
The web console calls this on every reload, and displays the warnings.
Currently we are checking for 3 configuration issues:
UNSUPPORTED FILE SYSTEM
,TOO MANY OPEN FILES
andOUT OF MMAP AREAS
.Also fixes error codes in
CairoException
.The same error codes were used for different errors.
Also adds a new SQL command to be able to suspend tables.
Optionally an error code/tag and error message can be specified.
The command has been added primarily to help testing.
Examples:
Also adds a new SQL function to simulate warnings.
Examples:
Web console should be reloaded after the function is executed, and the warning should appear.
Warnings accumulate, so you should see as many warnings as commands issued.
You can clear the warnings by running: