[
https://issues.apache.org/jira/browse/BEAM-5925?focusedWorklogId=167724&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-167724
]
ASF GitHub Bot logged work on BEAM-5925:
----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Nov/18 11:45
Start Date: 20/Nov/18 11:45
Worklog Time Spent: 10m
Work Description: echauchot commented on a change in pull request #7065:
[BEAM-5925] Add .withMaxRetryTimeoutMillis() to
ElasticsearchIO.ConnectionConfiguration
URL: https://github.com/apache/beam/pull/7065#discussion_r234970060
##########
File path:
sdks/java/io/elasticsearch/src/main/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIO.java
##########
@@ -374,6 +389,21 @@ RestClient createClient() throws IOException {
throw new IOException("Can't load the client certificate from the
keystore", e);
}
}
+ if (getMaxRetryTimeoutMillis() != null) {
+ restClientBuilder.setRequestConfigCallback(
+ new RestClientBuilder.RequestConfigCallback() {
+ @Override
+ public RequestConfig.Builder customizeRequestConfig(
+ RequestConfig.Builder requestConfigBuilder) {
+
+ return requestConfigBuilder
+ .setConnectTimeout(getMaxRetryTimeoutMillis())
Review comment:
IMHO you cannot set all these 3 parameters at the same time without telling
the user.
Also, putting the same value to both connection, socket and retry timeouts
does not make a lot of sense to me because values are different:
connect timeout defaults to 1 second
socket timeout defaults to 30 seconds
retry timeout defaults to 30 seconds too
please see
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/_timeouts.html
=> I recommend that you define 2 parameters `socketAndRetryTimeouts`
(because seem linked) and `connectTimeout` (which is the cause of flakiness in
the ticket BTW)
=> Do not forget to update the javadoc with these 2 parameters and also
explicitely tell the user what config you are changing and the previous default
values. See above.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 167724)
Time Spent: 0.5h (was: 20m)
> Test flake in ElasticsearchIOTest.testWriteFullAddressing
> ---------------------------------------------------------
>
> Key: BEAM-5925
> URL: https://issues.apache.org/jira/browse/BEAM-5925
> Project: Beam
> Issue Type: Bug
> Components: io-java-elasticsearch
> Reporter: Kenneth Knowles
> Assignee: Wout Scheepers
> Priority: Critical
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> https://builds.apache.org/view/A-D/view/Beam/job/beam_PostCommit_Java_GradleBuild/1789/
> https://scans.gradle.com/s/j42mwdsn5svcs
> {code}
> org.apache.beam.sdk.Pipeline$PipelineExecutionException: java.io.IOException:
> listener timeout after waiting for [30000] ms
> {code}
> Log looks like this:
> {code}
> [2018-10-31T04:06:07,571][INFO ][o.a.b.s.i.e.ElasticsearchIOTest]
> [testWriteFullAddressing]: before test
> [2018-10-31T04:06:07,572][INFO ][o.a.b.s.i.e.ElasticsearchIOTest]
> [ElasticsearchIOTest#testWriteFullAddressing]: setting up test
> [2018-10-31T04:06:07,589][INFO ][o.e.c.m.MetaDataIndexTemplateService]
> [node_s0] adding template [random_index_template] for index patterns [*]
> [2018-10-31T04:06:07,645][INFO ][o.a.b.s.i.e.ElasticsearchIOTest]
> [ElasticsearchIOTest#testWriteFullAddressing]: all set up test
> [2018-10-31T04:06:10,536][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [galilei] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:33,963][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [curie] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:34,034][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [darwin] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:34,050][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [copernicus] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:34,075][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [faraday] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:34,095][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [bohr] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:34,113][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [pasteur] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:34,142][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [einstein] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:34,205][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [maxwell] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:34,226][INFO ][o.e.c.m.MetaDataCreateIndexService]
> [node_s0] [newton] creating index, cause [auto(bulk api)], templates
> [random_index_template], shards [6]/[0], mappings []
> [2018-10-31T04:06:36,914][INFO ][o.e.c.r.a.AllocationService] [node_s0]
> Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards
> started [[galilei][4], [galilei][5]] ...]).
> [2018-10-31T04:06:36,970][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [galilei/Vn1b8XXVSAmrTb5BVe2IJQ] create_mapping [TYPE_1]
> [2018-10-31T04:06:37,137][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [newton/bjnImLt_QguBGEFH9lBJ6Q] create_mapping [TYPE_-1]
> [2018-10-31T04:06:37,385][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [maxwell/-RZ32NbRRZWaGaVfaptFIA] create_mapping [TYPE_0]
> [2018-10-31T04:06:37,636][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [einstein/2lgF5Vj6Ti2KTS-pYSzv3Q] create_mapping [TYPE_1]
> [2018-10-31T04:06:37,806][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [pasteur/832OwzleRSOHsWx85vOH-w] create_mapping [TYPE_0]
> [2018-10-31T04:06:38,103][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [bohr/9YTwB1yvTYKf9YjYCmHjwg] create_mapping [TYPE_1]
> [2018-10-31T04:06:38,229][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [faraday/vIMYG8vpTQKqNkyajcFOxw] create_mapping [TYPE_0]
> [2018-10-31T04:06:38,576][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [copernicus/NzCZssInSiOdZKTmLCoXRw] create_mapping [TYPE_1]
> [2018-10-31T04:06:38,890][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [darwin/g_sIfS5aQwi6BAXw_--vgw] create_mapping [TYPE_1]
> [2018-10-31T04:06:39,201][INFO ][o.e.c.m.MetaDataMappingService] [node_s0]
> [curie/PDuZqTZQROytGLowXGMxhA] create_mapping [TYPE_0]
> [2018-10-31T04:06:40,030][INFO ][o.a.b.s.i.e.ElasticsearchIOTest]
> [ElasticsearchIOTest#testWriteFullAddressing]: cleaning up after test
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [bohr/9YTwB1yvTYKf9YjYCmHjwg] deleting index
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [copernicus/NzCZssInSiOdZKTmLCoXRw] deleting index
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [maxwell/-RZ32NbRRZWaGaVfaptFIA] deleting index
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [pasteur/832OwzleRSOHsWx85vOH-w] deleting index
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [einstein/2lgF5Vj6Ti2KTS-pYSzv3Q] deleting index
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [newton/bjnImLt_QguBGEFH9lBJ6Q] deleting index
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [darwin/g_sIfS5aQwi6BAXw_--vgw] deleting index
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [galilei/Vn1b8XXVSAmrTb5BVe2IJQ] deleting index
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [curie/PDuZqTZQROytGLowXGMxhA] deleting index
> [2018-10-31T04:06:40,185][INFO ][o.e.c.m.MetaDataDeleteIndexService]
> [node_s0] [faraday/vIMYG8vpTQKqNkyajcFOxw] deleting index
> [2018-10-31T04:06:40,801][INFO ][o.e.c.m.MetaDataIndexTemplateService]
> [node_s0] removing template [random_index_template]
> [2018-10-31T04:06:40,811][INFO ][o.a.b.s.i.e.ElasticsearchIOTest]
> [ElasticsearchIOTest#testWriteFullAddressing]: cleaned up after test
> [2018-10-31T04:06:40,811][INFO ][o.a.b.s.i.e.ElasticsearchIOTest]
> [testWriteFullAddressing]: after test
> {code}
> So perhaps it is just too tight a timeout?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)