- Notifications
You must be signed in to change notification settings - Fork 25.6k
Add script information to the cluster info endpoint #96613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Documentation preview: |
| Hi @HiDAl, I've created a changelog YAML for you. |
cc82cac to 1f0b38e Compare spotless
80f8557 to e130e99 Compare | Hi @HiDAl, I've updated the changelog YAML for you. |
| Pinging @elastic/es-data-management (Team:Data Management) |
| @elasticmachine run elasticsearch-ci/part-1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some minor comments but almost 🚀
| `compilations_history`:: | ||
| (object) | ||
| Contains this recent history of script compilations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the fits better but I could be wrong, so I am just putting it out there.
| Contains this recent history of script compilations. | |
| Contains the recent history of script compilations. |
| `cache_evictions_history`:: | ||
| (object) | ||
| Contains this recent history of script cache evictions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same:
| Contains this recent history of script cache evictions. | |
| Contains the recent history of script cache evictions. |
| } | ||
| | ||
| public static ScriptContextStats merge(ScriptContextStats first, ScriptContextStats second) { | ||
| assert first.context.equals(second.context) : "To merge 2 ScriptContextStats both of them must to have the same context."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| assert first.context.equals(second.context) : "To merge 2 ScriptContextStats both of them must to have the same context."; | |
| assert first.context.equals(second.context) : "To merge 2 ScriptContextStats both of them must have the same context."; |
server/src/test/java/org/elasticsearch/script/ScriptContextStatsTests.java Show resolved Hide resolved
| var mergedContextStats = List.<ScriptContextStats>of(); | ||
| | ||
| if (first.contextStats.isEmpty() == false || second.contextStats.isEmpty() == false) { | ||
| var mapToCollectMerges = new HashMap<String, ScriptContextStats>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe rename it to mapToCollectMergedStats or something in that direction. No strong feelings, just an idea.
| @elasticsearchmachine run elasticsearch-ci/part-1 |
| @elasticsearchmachine run elasticsearch-ci/part-1 |
| @elasticsearchmachine run elasticsearch-ci/bwc |
| @elasticsearchmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Add a new target (
script) to the/_infoAPI. It consolidates all thescriptinformation from the cluster nodes and returns a summary at the cluster level (compared with_nodes/stats/scriptit lacks the<node>dimension).As per #95394 comment, the
script_cachestats is deprecated, so it's not needed to be migrated.Closes #95394