Skip to content

Conversation

@stu-elastic
Copy link
Contributor

@stu-elastic stu-elastic commented Mar 23, 2020

Adds script cache stats to _node/stats.
If using the general cache:

      "script_cache": {
        "sum": {
          "compilations": 12,
          "cache_evictions": 9,
          "compilation_limit_triggered": 5
        }
      }

If using context caches:

      "script_cache": {       
        "sum": {                 
          "compilations": 13,                
          "cache_evictions": 9,
          "compilation_limit_triggered": 5
        },                                
        "contexts": [         
          {                      
            "context": "aggregation_selector",
            "compilations": 8,
            "cache_evictions": 6,
            "compilation_limit_triggered": 3
          },                  
          {                      
            "context": "aggs",              
            "compilations": 5,
            "cache_evictions": 3,
            "compilation_limit_triggered": 2
          },                  

Refs: #50152

@stu-elastic stu-elastic added >enhancement WIP :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache labels Mar 23, 2020
@stu-elastic stu-elastic requested review from jdconrad and rjernst March 23, 2020 18:18
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@williamrandolph williamrandolph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One question, one small change request.

@stu-elastic stu-elastic removed the WIP label Mar 26, 2020
Copy link
Contributor

@williamrandolph williamrandolph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, though I haven't dug into how the tests are set up.

Copy link
Contributor

@jdconrad jdconrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stu-elastic stu-elastic merged commit 32f46f2 into elastic:master Mar 26, 2020
stu-elastic added a commit to stu-elastic/elasticsearch that referenced this pull request Mar 26, 2020
Adds script cache stats to `_node/stats`.
If using the general cache:
```
      "script_cache": {
        "sum": {
          "compilations": 12,
          "cache_evictions": 9,
          "compilation_limit_triggered": 5
        }
      }

```
If using context caches:
```
      "script_cache": {
        "sum": {
          "compilations": 13,
          "cache_evictions": 9,
          "compilation_limit_triggered": 5
        },
        "contexts": [
          {
            "context": "aggregation_selector",
            "compilations": 8,
            "cache_evictions": 6,
            "compilation_limit_triggered": 3
          },
          {
            "context": "aggs",
            "compilations": 5,
            "cache_evictions": 3,
            "compilation_limit_triggered": 2
          },
```
Refs: elastic#50152
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Mar 27, 2020
In elastic#54008 we used v7.8 here but never backported to 7.x.
now that 7.x has moved to 7.8 BwC serialization is broken => adjusting the constant here until we backport.
original-brownbear added a commit that referenced this pull request Mar 27, 2020
In #54008 we used v7.8 here but never backported to 7.x.
now that 7.x has moved to 7.8 BwC serialization is broken => adjusting the constant here until we backport.
Closes #54313
stu-elastic added a commit to stu-elastic/elasticsearch that referenced this pull request Mar 27, 2020
Adds script cache stats to `_node/stats`.
If using the general cache:
```
      "script_cache": {
        "sum": {
          "compilations": 12,
          "cache_evictions": 9,
          "compilation_limit_triggered": 5
        }
      }

```
If using context caches:
```
      "script_cache": {
        "sum": {
          "compilations": 13,
          "cache_evictions": 9,
          "compilation_limit_triggered": 5
        },
        "contexts": [
          {
            "context": "aggregation_selector",
            "compilations": 8,
            "cache_evictions": 6,
            "compilation_limit_triggered": 3
          },
          {
            "context": "aggs",
            "compilations": 5,
            "cache_evictions": 3,
            "compilation_limit_triggered": 2
          },
```
Refs: elastic#50152
stu-elastic added a commit that referenced this pull request Mar 27, 2020
Adds script cache stats to `_node/stats`.
If using the general cache:
```
      "script_cache": {
        "sum": {
          "compilations": 12,
          "cache_evictions": 9,
          "compilation_limit_triggered": 5
        }
      }

```
If using context caches:
```
      "script_cache": {
        "sum": {
          "compilations": 13,
          "cache_evictions": 9,
          "compilation_limit_triggered": 5
        },
        "contexts": [
          {
            "context": "aggregation_selector",
            "compilations": 8,
            "cache_evictions": 6,
            "compilation_limit_triggered": 3
          },
          {
            "context": "aggs",
            "compilations": 5,
            "cache_evictions": 3,
            "compilation_limit_triggered": 2
          },
```
Backport of: 32f46f2
Refs: #50152
@stu-elastic
Copy link
Contributor Author

master: 32f46f2
7.x: 1630de4

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

Labels

:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement v7.8.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants