Add new setting to ignore pagination where it is unsupported in V2.#318
Conversation
Codecov Report
@@ Coverage Diff @@
## integ-ignore-pagination-switch #318 +/- ##
=================================================================
Coverage ? 97.52%
Complexity ? 4656
=================================================================
Files ? 408
Lines ? 11963
Branches ? 830
=================================================================
Hits ? 11667
Misses ? 289
Partials ? 7
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
plugin/src/main/java/org/opensearch/sql/plugin/config/OpenSearchPluginModule.java
Outdated
Show resolved
Hide resolved
|
Maybe update the PR description to include an example showing how you change/set the new setting. Also I noticed how the setting can be changed when making an opensearch request but how would I change the setting if I wanted to make it through the opensearchsql plugin? |
|
Updated |
| QUERY_SIZE_LIMIT("plugins.query.size_limit"), | ||
| ENCYRPTION_MASTER_KEY("plugins.query.datasources.encryption.masterkey"), | ||
| DATASOURCES_URI_ALLOWHOSTS("plugins.query.datasources.uri.allowhosts"), | ||
| IGNORE_UNSUPPORTED_PAGINATION("plugins.query.ignore_unsupported_pagination"), |
There was a problem hiding this comment.
does this only affect sql request? Maybe plugins.sql.ignore_unsupported_pagination or plugins.sql.cursor.ignore_unsupported?
There was a problem hiding this comment.
It affects all pagination requests, but we support pagination in SQL only for now.
I can easily rename the setting.
165e98c to
2d33f53
Compare
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
2d33f53 to
9ba8341
Compare
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
| } | ||
|
|
||
| protected static JSONObject updateClusterSettings(ClusterSetting setting) throws IOException { | ||
| public static JSONObject updateClusterSettings(ClusterSetting setting) throws IOException { |
There was a problem hiding this comment.
why does this need to be made public? It's being called by ITs that extend this class.
There was a problem hiding this comment.
I use it in correctness test, which does not inherit this class.
| } | ||
|
|
||
| protected static class ClusterSetting { | ||
| public static class ClusterSetting { |
There was a problem hiding this comment.
I use it in correctness test, which does not inherit this class.
| l -> l.endsWith("Request is not supported and falling back to old SQL engine"))); | ||
| logSize = lines.size(); | ||
|
|
||
| updateClusterSettings( |
There was a problem hiding this comment.
feels like these should be two different tests
| @Override | ||
| protected void init() throws Exception { | ||
| super.init(); | ||
| updateClusterSettings( |
There was a problem hiding this comment.
is this needed? I feel like this is unnecessary for the tests to pass.
There was a problem hiding this comment.
It it true by default, but previous test may set it to false.
| } | ||
| LOG.info("[{}] Request {} is not supported and falling back to old SQL engine", | ||
| QueryContext.getRequestId(), newSqlRequest); | ||
| LOG.info("[{}] Request is not supported and falling back to old SQL engine", |
There was a problem hiding this comment.
It was dumping non anonymized query
| =============================== | ||
|
|
||
| OpenSearch SQL enables you to extract insights out of OpenSearch using the familiar SQL query syntax. Please refer to the `technical documentation <https://docs-beta.opensearch.org/>`_ for detailed information on installing and configuring opendistro-elasticsearch-sql plugin. In this user reference manual, you can find many information for your reference. In each part, we try to make it clear by adding work example along with detailed description. Here is table of contents of the documentation: | ||
| OpenSearch SQL enables you to extract insights out of OpenSearch using the familiar SQL query syntax. Please refer to the `technical documentation <https://opensearch.org/docs/latest/install-and-configure/plugins/>`_ for detailed information on installing and configuring SQL plugin. In this user reference manual, you can find many information for your reference. In each part, we try to make it clear by adding work example along with detailed description. Here is table of contents of the documentation: |
Description
Changes how pagination requests with unsupported/incompatible [with pagination] queries are handled.
Adds new setting
plugins.query.ignore_unsupported_pagination:trueby defaulttruesuch requests are performed without paginationfalsesuch requests fall back to legacy engineMisc changes:
Issues Resolved
opensearch-project#1765, opensearch-project#78
Check List
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.