-
Notifications
You must be signed in to change notification settings - Fork 141
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
Throw exception for RECOVER INDEX JOB query #2988
Conversation
Signed-off-by: Tomoyuki Morita <[email protected]>
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.
LGTM but please double check with @dai-chen if there's any concern on disable this path
@@ -119,6 +119,9 @@ private AsyncQueryHandler getQueryHandlerForFlintExtensionQuery( | |||
} else if (IndexQueryActionType.REFRESH.equals(indexQueryDetails.getIndexQueryActionType())) { | |||
// Manual refresh should be handled by batch handler | |||
return queryHandlerFactory.getRefreshQueryHandler(dispatchQueryRequest.getAccountId()); | |||
} else if (IndexQueryActionType.RECOVER.equals(indexQueryDetails.getIndexQueryActionType())) { | |||
// RECOVER INDEX JOB should not be executed from async-query-core | |||
throw new IllegalArgumentException("RECOVER INDEX JOB is not allowed."); |
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.
throw unsupported operation exception?
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.
I checked other codes and IllegalArgumentException
tend to be used when user specified something unsupported in the parameters. And UnsupportedOperationException
tend to be used for when the operation (like create
, delete
, etc.) itself is not supported. I see mixed cases, though...
Signed-off-by: Tomoyuki Morita <[email protected]> (cherry picked from commit 2c878fb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 2c878fb) Signed-off-by: Tomoyuki Morita <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Related Issues
n/a
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.