mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
Remove trappy timeouts from GetMappingsRequest
(#120035)
Relates #107984
This commit is contained in:
parent
455fde2849
commit
4605ecf44d
42 changed files with 208 additions and 106 deletions
|
@ -285,7 +285,7 @@ public class TransportDownsampleAction extends AcknowledgedTransportMasterNodeAc
|
|||
// At any point if there is an issue, delete the downsample index
|
||||
|
||||
// 1. Extract source index mappings
|
||||
final GetMappingsRequest getMappingsRequest = new GetMappingsRequest().indices(sourceIndexName);
|
||||
final GetMappingsRequest getMappingsRequest = new GetMappingsRequest(request.masterNodeTimeout()).indices(sourceIndexName);
|
||||
getMappingsRequest.setParentTask(parentTask);
|
||||
client.admin().indices().getMappings(getMappingsRequest, listener.delegateFailureAndWrap((delegate, getMappingsResponse) -> {
|
||||
final Map<String, Object> sourceIndexMappings = getMappingsResponse.mappings()
|
||||
|
|
|
@ -1179,7 +1179,7 @@ public class DownsampleActionSingleNodeTests extends ESSingleNodeTestCase {
|
|||
@SuppressWarnings("unchecked")
|
||||
private void assertDownsampleIndex(String sourceIndex, String downsampleIndex, DownsampleConfig config) throws Exception {
|
||||
// Retrieve field information for the metric fields
|
||||
final GetMappingsResponse getMappingsResponse = indicesAdmin().prepareGetMappings(sourceIndex).get();
|
||||
final GetMappingsResponse getMappingsResponse = indicesAdmin().prepareGetMappings(TEST_REQUEST_TIMEOUT, sourceIndex).get();
|
||||
final Map<String, Object> sourceIndexMappings = getMappingsResponse.mappings()
|
||||
.entrySet()
|
||||
.stream()
|
||||
|
@ -1221,8 +1221,9 @@ public class DownsampleActionSingleNodeTests extends ESSingleNodeTestCase {
|
|||
|
||||
assertFieldMappings(config, metricFields, mappings);
|
||||
|
||||
GetMappingsResponse indexMappings = indicesAdmin().getMappings(new GetMappingsRequest().indices(downsampleIndex, sourceIndex))
|
||||
.actionGet();
|
||||
GetMappingsResponse indexMappings = indicesAdmin().getMappings(
|
||||
new GetMappingsRequest(TEST_REQUEST_TIMEOUT).indices(downsampleIndex, sourceIndex)
|
||||
).actionGet();
|
||||
Map<String, String> downsampleIndexProperties = (Map<String, String>) indexMappings.mappings()
|
||||
.get(downsampleIndex)
|
||||
.sourceAsMap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue