From 882b59de7b794850bcb79373c03f8a4fad70101f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Mar 2024 14:25:36 +0000 Subject: [PATCH] Change async query default setting (#2561) * Change aysnc_query default setting Signed-off-by: Peng Huo * fix doctest Signed-off-by: Peng Huo --------- Signed-off-by: Peng Huo (cherry picked from commit b375a28b8a8849d6d955f0e5520ea121ce54cc0e) Signed-off-by: github-actions[bot] --- docs/user/admin/settings.rst | 16 ++++++++-------- .../opensearch/setting/OpenSearchSettings.java | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/user/admin/settings.rst b/docs/user/admin/settings.rst index c1a7a4eb8b..0f124d1dac 100644 --- a/docs/user/admin/settings.rst +++ b/docs/user/admin/settings.rst @@ -318,9 +318,9 @@ plugins.query.executionengine.spark.session.limit Description ----------- -Each cluster can have maximum 100 sessions running in parallel by default. You can increase limit by this setting. +Each cluster can have maximum 10 sessions running in parallel by default. You can increase limit by this setting. -1. The default value is 100. +1. The default value is 10. 2. This setting is node scope. 3. This setting can be updated dynamically. @@ -355,9 +355,9 @@ plugins.query.executionengine.spark.refresh_job.limit Description ----------- -Each cluster can have maximum 20 datasources. You can increase limit by this setting. +Each cluster can have maximum 5 refresh job running concurrently. You can increase limit by this setting. -1. The default value is 20. +1. The default value is 5. 2. This setting is node scope. 3. This setting can be updated dynamically. @@ -499,14 +499,14 @@ Description This setting defines the time-to-live (TTL) for request indices when plugins.query.executionengine.spark.auto_index_management.enabled is true. By default, request indices older than 14 days are deleted. -* Default Value: 14 days +* Default Value: 30 days -To change the TTL to 30 days for example, execute the following command: +To change the TTL to 60 days for example, execute the following command: SQL query:: sh$ curl -sS -H 'Content-Type: application/json' -X PUT localhost:9200/_cluster/settings \ - ... -d '{"transient":{"plugins.query.executionengine.spark.session.index.ttl":"30d"}}' + ... -d '{"transient":{"plugins.query.executionengine.spark.session.index.ttl":"60d"}}' { "acknowledged": true, "persistent": {}, @@ -517,7 +517,7 @@ SQL query:: "spark": { "session": { "index": { - "ttl": "30d" + "ttl": "60d" } } } diff --git a/opensearch/src/main/java/org/opensearch/sql/opensearch/setting/OpenSearchSettings.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/setting/OpenSearchSettings.java index 159b37309e..8a6c4cc963 100644 --- a/opensearch/src/main/java/org/opensearch/sql/opensearch/setting/OpenSearchSettings.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/setting/OpenSearchSettings.java @@ -147,21 +147,21 @@ public class OpenSearchSettings extends Settings { public static final Setting SPARK_EXECUTION_SESSION_LIMIT_SETTING = Setting.intSetting( Key.SPARK_EXECUTION_SESSION_LIMIT.getKeyValue(), - 100, + 10, Setting.Property.NodeScope, Setting.Property.Dynamic); public static final Setting SPARK_EXECUTION_REFRESH_JOB_LIMIT_SETTING = Setting.intSetting( Key.SPARK_EXECUTION_REFRESH_JOB_LIMIT.getKeyValue(), - 50, + 5, Setting.Property.NodeScope, Setting.Property.Dynamic); public static final Setting SESSION_INDEX_TTL_SETTING = Setting.positiveTimeSetting( Key.SESSION_INDEX_TTL.getKeyValue(), - timeValueDays(14), + timeValueDays(30), Setting.Property.NodeScope, Setting.Property.Dynamic);