Skip to content

Commit

Permalink
Set update mappings mater node timeout to 30 min (#38652)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Tim-Brooks authored Feb 8, 2019
1 parent 875ecd9 commit 8860291
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ private void updateMappings(Client leaderClient, Index leaderIndex, long leaderM
leaderIndexMetadata.getMappings().size() + "]";
MappingMetaData mappingMetaData = leaderIndexMetadata.getMappings().iterator().next().value;
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());
}
}
Expand Down

0 comments on commit 8860291

Please sign in to comment.