Skip to content

Conversation

@martijnvg
Copy link
Member

SourceLoader.SyntheticFieldLoader#write(...) is hot code, avoid using streams api and use loop and compute sum.

SourceLoader.SyntheticFieldLoader#write(...) is hot code, avoid using streams api and use loop and compute sum.
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@martijnvg martijnvg added the auto-backport Automatically create backport pull requests when merged label May 26, 2025
@martijnvg martijnvg enabled auto-merge (squash) May 26, 2025 13:21
@martijnvg
Copy link
Member Author

@elasticmachine update branch

@martijnvg
Copy link
Member Author

Failed because:

[2025-05-26T19:10:08,074][WARN ][o.e.x.m.i.l.ModelLoadingService] [yamlRestTest-0] [a-classification-model] failed to load model definition
org.elasticsearch.ResourceNotFoundException: Could not find trained model definition [a-classification-model]
	at org.elasticsearch.xpack.ml.inference.persistence.TrainedModelProvider.lambda$getTrainedModelForInference$16(TrainedModelProvider.java:599) ~[?:?]
	at org.elasticsearch.xpack.ml.inference.persistence.ChunkedTrainedModelRestorer.doSearch(ChunkedTrainedModelRestorer.java:162) ~[?:?]
	at org.elasticsearch.xpack.ml.inference.persistence.ChunkedTrainedModelRestorer.lambda$restoreModelDefinition$0(ChunkedTrainedModelRestorer.java:134) ~[?:?]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:977) ~[elasticsearch-9.1.0-SNAPSHOT.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619) ~[?:?]
	at java.lang.Thread.run(Thread.java:1447) ~[?:?]
[2025-05-26T19:10:08,093][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [yamlRestTest-0] fatal error in thread [elasticsearch[yamlRestTest-0][ml_utility][T#3]], exiting
java.lang.AssertionError: Used bytes: [-520] must be >= 0
	at org.elasticsearch.common.breaker.ChildMemoryCircuitBreaker.addWithoutBreaking(ChildMemoryCircuitBreaker.java:207) ~[elasticsearch-9.1.0-SNAPSHOT.jar:?]
	at org.elasticsearch.xpack.ml.inference.loadingservice.ModelLoadingService.lambda$loadModel$10(ModelLoadingService.java:489) ~[?:?]
	at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:78) ~[elasticsearch-9.1.0-SNAPSHOT.jar:?]
	at org.elasticsearch.action.ActionListener$2.onFailure(ActionListener.java:266) ~[elasticsearch-9.1.0-SNAPSHOT.jar:?]
	at org.elasticsearch.xpack.ml.inference.persistence.TrainedModelProvider.lambda$getTrainedModelForInference$16(TrainedModelProvider.java:601) ~[?:?]
	at org.elasticsearch.xpack.ml.inference.persistence.ChunkedTrainedModelRestorer.doSearch(ChunkedTrainedModelRestorer.java:162) ~[?:?]
	at org.elasticsearch.xpack.ml.inference.persistence.ChunkedTrainedModelRestorer.lambda$restoreModelDefinition$0(ChunkedTrainedModelRestorer.java:134) ~[?:?]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:977) ~[elasticsearch-9.1.0-SNAPSHOT.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619) ~[?:?]
	at java.lang.Thread.run(Thread.java:1447) ~[?:?]

This is unrelated to this change, so updating branch and see if that addresses that CI failure.

@martijnvg martijnvg merged commit c1df652 into elastic:main May 26, 2025
17 of 18 checks passed
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request May 26, 2025
SourceLoader.SyntheticFieldLoader#write(...) is hot code, avoid using streams api and use loop and compute sum.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.19

elasticsearchmachine pushed a commit that referenced this pull request May 26, 2025
SourceLoader.SyntheticFieldLoader#write(...) is hot code, avoid using streams api and use loop and compute sum.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >non-issue :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants