Skip to content

Commit 8860291

Browse files
authored
Set update mappings mater node timeout to 30 min (#38652)
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.
1 parent 875ecd9 commit 8860291

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/repository/CcrRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ private void updateMappings(Client leaderClient, Index leaderIndex, long leaderM
318318
leaderIndexMetadata.getMappings().size() + "]";
319319
MappingMetaData mappingMetaData = leaderIndexMetadata.getMappings().iterator().next().value;
320320
if (mappingMetaData != null) {
321-
final PutMappingRequest putMappingRequest = CcrRequests.putMappingRequest(followerIndex.getName(), mappingMetaData);
321+
final PutMappingRequest putMappingRequest = CcrRequests.putMappingRequest(followerIndex.getName(), mappingMetaData)
322+
.masterNodeTimeout(TimeValue.timeValueMinutes(30));
322323
followerClient.admin().indices().putMapping(putMappingRequest).actionGet(ccrSettings.getRecoveryActionTimeout());
323324
}
324325
}

0 commit comments

Comments
 (0)