Skip to content

[8.0] Reuse MappingMetadata instances in Metadata class.#81036

Merged
martijnvg merged 1 commit intoelastic:8.0from
martijnvg:backport_80348
Nov 25, 2021
Merged

[8.0] Reuse MappingMetadata instances in Metadata class.#81036
martijnvg merged 1 commit intoelastic:8.0from
martijnvg:backport_80348

Conversation

@martijnvg
Copy link
Copy Markdown
Member

Backporting #80348 to 8.0 branch.

Hash the mapping source of a MappingMetadata instance and then
cache it in Metadata class. A mapping with the same hash
will use a cached MappingMetadata instance. This can
significantly reduce the number of MappingMetadata instances
for data streams and index patterns.

Idea originated from #69772, but just focusses on the jvm heap memory savings.
And hashes the mapping instead of assigning it an uuid.

Relates to #77466

Backporting elastic#80348 to 8.0 branch.

Hash the mapping source of a MappingMetadata instance and then
cache it in Metadata class. A mapping with the same hash
will use a cached MappingMetadata instance. This can
significantly reduce the number of MappingMetadata instances
for data streams and index patterns.

Idea originated from elastic#69772, but just focusses on the jvm heap memory savings.
And hashes the mapping instead of assigning it an uuid.

Relates to elastic#77466
@martijnvg martijnvg changed the title Reuse MappingMetadata instances in Metadata class. [8.0] Reuse MappingMetadata instances in Metadata class. Nov 25, 2021
@martijnvg
Copy link
Copy Markdown
Member Author

The failure in part-2 is related to Jenkins and not the a real build failure:

:00:47 [PostBuildScript] - [INFO] Executing post build scripts.
14:00:48 HttpMethod: GET
14:00:49 URL: https://homer.app.elstc.co/webhook/jenkins/build-finished
14:00:49 X-Jenkins-Build: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+pull-request+part-2/1738/
14:00:49 Sending request to url: https://homer.app.elstc.co/webhook/jenkins/build-finished
14:00:51 ERROR: Build step failed with exception
14:00:52 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
14:00:52 	at sun.security.ssl.Alert.createSSLException(Alert.java:131)
14:00:52 	at sun.security.ssl.Alert.createSSLException(Alert.java:117)
14:00:52 	at sun.security.ssl.TransportContext.fatal(TransportContext.java:311)
14:00:52 	at sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:293)
14:00:52 	at sun.security.ssl.TransportContext.dispatch(TransportContext.java:185)
14:00:52 	at sun.security.ssl.SSLTransport.decode(SSLTransport.java:152)
14:00:52 	at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1392)
14:00:52 	at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1300)
14:00:52 	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:435)
14:00:52 	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436)
14:00:52 	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
14:00:52 	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
14:00:52 	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
14:00:52 	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
14:00:52 	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
14:00:52 	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
14:00:52 	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
14:00:52 	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
14:00:52 	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
14:00:52 	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
14:00:52 	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
14:00:52 	at jenkins.plugins.http_request.util.HttpClientUtil.execute(HttpClientUtil.java:119)
14:00:52 	at jenkins.plugins.http_request.HttpRequestExecution.executeRequest(HttpRequestExecution.java:392)
14:00:52 	at jenkins.plugins.http_request.HttpRequestExecution.authAndRequest(HttpRequestExecution.java:328)
14:00:52 	at jenkins.plugins.http_request.HttpRequestExecution.call(HttpRequestExecution.java:260)
14:00:52 Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to elasticsearch-ci-immutable-sles-15-1637845863206788342
14:00:52 		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)
14:00:52 		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
14:00:52 		at hudson.remoting.Channel.call(Channel.java:1001)
14:00:52 		at jenkins.plugins.http_request.HttpRequest.perform(HttpRequest.java:408)
14:00:52 		at org.jenkinsci.plugins.postbuildscript.processor.Processor.processBuildSteps(Processor.java:180)
14:00:52 		at org.jenkinsci.plugins.postbuildscript.processor.Processor.processScripts(Processor.java:91)
14:00:52 		at org.jenkinsci.plugins.postbuildscript.processor.Processor.process(Processor.java:79)
14:00:52 		at org.jenkinsci.plugins.postbuildscript.processor.Processor.process(Processor.java:73)
14:00:52 		at org.jenkinsci.plugins.postbuildscript.PostBuildScript.perform(PostBuildScript.java:77)
14:00:52 		at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
14:00:52 		at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)
14:00:52 		at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755)
14:00:52 		at hudson.model.Build$BuildExecution.post2(Build.java:178)
14:00:52 		at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:699)
14:00:52 		at hudson.model.Run.execute(Run.java:1913)
14:00:52 		at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
14:00:52 		at hudson.model.ResourceController.execute(ResourceController.java:99)
14:00:52 		at hudson.model.Executor.run(Executor.java:431)
14:00:52 Caused: java.lang.IllegalStateException
14:00:52 	at jenkins.plugins.http_request.HttpRequestExecution.call(HttpRequestExecution.java:263)
14:00:52 	at jenkins.plugins.http_request.HttpRequestExecution.call(HttpRequestExecution.java:79)
14:00:52 	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
14:00:52 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
14:00:52 	at hudson.remoting.Request$2.run(Request.java:376)
14:00:52 	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
14:00:52 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
14:00:52 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
14:00:52 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
14:00:52 	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:122)
14:00:52 	at java.lang.Thread.run(Thread.java:748)
14:00:52 Build step 'Execute scripts' marked build as failure
14:00:52 Setting status of eba820854894a29b558e7f06c1d922c10e6b

@martijnvg martijnvg merged commit b07f71a into elastic:8.0 Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants