diff --git a/docs/changelog/145035.yaml b/docs/changelog/145035.yaml new file mode 100644 index 0000000000000..23d953fd1546e --- /dev/null +++ b/docs/changelog/145035.yaml @@ -0,0 +1,5 @@ +area: CCR +issues: [] +pr: 145035 +summary: CCR follower index needs to copy transport version from CCR leader index +type: bug diff --git a/x-pack/plugin/ccr/src/internalClusterTest/java/org/elasticsearch/xpack/ccr/CcrRepositoryIT.java b/x-pack/plugin/ccr/src/internalClusterTest/java/org/elasticsearch/xpack/ccr/CcrRepositoryIT.java index d0b4c75165fb6..017850233e73a 100644 --- a/x-pack/plugin/ccr/src/internalClusterTest/java/org/elasticsearch/xpack/ccr/CcrRepositoryIT.java +++ b/x-pack/plugin/ccr/src/internalClusterTest/java/org/elasticsearch/xpack/ccr/CcrRepositoryIT.java @@ -200,6 +200,7 @@ public void testThatRepositoryRecoversEmptyIndexBasedOnLeaderSettings() throws I // UUID is changed so that we can follow indexes on same cluster assertNotEquals(leaderMetadata.getIndexUUID(), followerMetadata.getIndexUUID()); + assertEquals(leaderMetadata.getTransportVersion(), followerMetadata.getTransportVersion()); } public void testDocsAreRecovered() throws Exception { diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/repository/CcrRepository.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/repository/CcrRepository.java index a0b3be170294c..673e575e4862a 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/repository/CcrRepository.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/repository/CcrRepository.java @@ -325,6 +325,7 @@ public IndexMetadata getSnapshotIndexMetaData(RepositoryData repositoryData, Sna imdBuilder.putCustom(Ccr.CCR_CUSTOM_METADATA_KEY, customMetadata); imdBuilder.settings(leaderIndexMetadata.getSettings()); + imdBuilder.transportVersion(leaderIndexMetadata.getTransportVersion()); // Copy mappings from leader IMD to follow IMD imdBuilder.putMapping(leaderIndexMetadata.mapping());