Set update mappings mater node timeout to 30 min (#38439)

This is related to #35975. We do not want a slow master to fail a
recovery from remote process due to a slow put mappings call. This
commit increases the master node timeout on this call to 30 mins.
This commit is contained in:
Tim Brooks 2019-02-05 16:22:11 -06:00 committed by GitHub
parent f939c3c5ef
commit fb0ec26fd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -313,7 +313,8 @@ public class CcrRepository extends AbstractLifecycleComponent implements Reposit
final IndexMetaData leaderIndexMetadata = indexMetadataFuture.actionGet(ccrSettings.getRecoveryActionTimeout());
final MappingMetaData mappingMetaData = leaderIndexMetadata.mapping();
if (mappingMetaData != null) {
final PutMappingRequest putMappingRequest = CcrRequests.putMappingRequest(followerIndex.getName(), mappingMetaData);
final PutMappingRequest putMappingRequest = CcrRequests.putMappingRequest(followerIndex.getName(), mappingMetaData)
.masterNodeTimeout(TimeValue.timeValueMinutes(30));
followerClient.admin().indices().putMapping(putMappingRequest).actionGet(ccrSettings.getRecoveryActionTimeout());
}
}