Skip to content

Commit d5bf744

Browse files
eirsepengechas
authored andcommitted
Add jvm aware setting and max num docs settings for batching docs for percolate queries (opensearch-project#1435)
* add jvm aware and max docs settings for batching docs for percolate queries Signed-off-by: Surya Sashank Nistala <[email protected]> * fix stats logging Signed-off-by: Surya Sashank Nistala <[email protected]> * add queryfieldnames field in findings mapping Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]>
1 parent 35c2872 commit d5bf744

File tree

6 files changed

+286
-82
lines changed

6 files changed

+286
-82
lines changed

alerting/src/main/kotlin/org/opensearch/alerting/AlertingPlugin.kt

+4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ import org.opensearch.core.xcontent.XContentParser
8383
import org.opensearch.env.Environment
8484
import org.opensearch.env.NodeEnvironment
8585
import org.opensearch.index.IndexModule
86+
import org.opensearch.monitor.jvm.JvmStats
8687
import org.opensearch.painless.spi.PainlessExtension
8788
import org.opensearch.painless.spi.Whitelist
8889
import org.opensearch.painless.spi.WhitelistLoader
@@ -237,6 +238,7 @@ internal class AlertingPlugin : PainlessExtension, ActionPlugin, ScriptPlugin, R
237238
.registerTriggerService(TriggerService(scriptService))
238239
.registerAlertService(AlertService(client, xContentRegistry, alertIndices))
239240
.registerDocLevelMonitorQueries(DocLevelMonitorQueries(client, clusterService))
241+
.registerJvmStats(JvmStats.jvmStats())
240242
.registerConsumers()
241243
.registerDestinationSettings()
242244
scheduledJobIndices = ScheduledJobIndices(client.admin(), clusterService)
@@ -284,6 +286,8 @@ internal class AlertingPlugin : PainlessExtension, ActionPlugin, ScriptPlugin, R
284286
AlertingSettings.ALERT_HISTORY_MAX_DOCS,
285287
AlertingSettings.ALERT_HISTORY_RETENTION_PERIOD,
286288
AlertingSettings.ALERTING_MAX_MONITORS,
289+
AlertingSettings.PERCOLATE_QUERY_DOCS_SIZE_MEMORY_PERCENTAGE_LIMIT,
290+
AlertingSettings.PERCOLATE_QUERY_MAX_NUM_DOCS_IN_MEMORY,
287291
AlertingSettings.REQUEST_TIMEOUT,
288292
AlertingSettings.MAX_ACTION_THROTTLE_VALUE,
289293
AlertingSettings.FILTER_BY_BACKEND_ROLES,

0 commit comments

Comments
 (0)