Skip to content

Scripting: Groundwork for caching script results (#49895)#49944

Merged
stu-elastic merged 1 commit intoelastic:7.xfrom
stu-elastic:7.x-backport-caching-1
Dec 6, 2019
Merged

Scripting: Groundwork for caching script results (#49895)#49944
stu-elastic merged 1 commit intoelastic:7.xfrom
stu-elastic:7.x-backport-caching-1

Conversation

@stu-elastic
Copy link
Copy Markdown
Contributor

In order to cache script results in the query shard cache, we need to
check if scripts are deterministic. This change adds a default method
to the script factories, isResultDeterministic() -> false which is
used by the QueryShardContext.

Script results were never cached and that does not change here. Future
changes will implement this method based on whether the results of the
scripts are deterministic or not and therefore cacheable.

Refs: #49466

Backport

In order to cache script results in the query shard cache, we need to
check if scripts are deterministic.  This change adds a default method
to the script factories, `isResultDeterministic() -> false` which is
used by the `QueryShardContext`.

Script results were never cached and that does not change here.  Future
changes will implement this method based on whether the results of the
scripts are deterministic or not and therefore cacheable.

Refs: elastic#49466
@stu-elastic stu-elastic added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache backport v7.6.0 labels Dec 6, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Scripting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache v7.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants