Skip to content

CCR follower index needs to copy transport version from CCR leader index#145035

Merged
jdconrad merged 6 commits intoelastic:mainfrom
jdconrad:fix/ccr-follower-transport-version
Mar 26, 2026
Merged

CCR follower index needs to copy transport version from CCR leader index#145035
jdconrad merged 6 commits intoelastic:mainfrom
jdconrad:fix/ccr-follower-transport-version

Conversation

@jdconrad
Copy link
Contributor

@jdconrad jdconrad commented Mar 26, 2026

Currently, when adding a follower index to a leader index using CCR, transport version is not copied which leads to errors in the upgrade assistant.

…follow

CcrRepository.getSnapshotIndexMetaData builds the follower's IndexMetadata
from scratch using IndexMetadata.builder(String) and manually copies
settings, mappings, and routing info from the leader. However, it never
copied the transport_version field, leaving it at TransportVersion.ZERO
on every newly created follower index.

This caused the Upgrade Assistant's percolator deprecation check
(reindexRequiredForPercolatorFields) to continuously fire on follower
indices because the check compares transport_version / 1000 buckets, and
bucket 0 is always less than the current minor release bucket.

The fix copies the leader's transport_version into the follower's
IndexMetadata during follow bootstrapping so that the follower correctly
reflects the version at which the leader index was created or last
reindexed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jdconrad jdconrad added >bug :Distributed/CCR Issues around the Cross Cluster State Replication features auto-backport Automatically create backport pull requests when merged branch:9.2 branch:8.19 v9.4.0 branch:9.3 labels Mar 26, 2026
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticsearchmachine
Copy link
Collaborator

Hi @jdconrad, I've created a changelog YAML for you.

jdconrad and others added 4 commits March 26, 2026 14:04
Replace docs/changelog/144973.yaml with the correct docs/changelog/145035.yaml
which reflects the actual PR number.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Contributor

@Tim-Brooks Tim-Brooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jdconrad jdconrad enabled auto-merge (squash) March 26, 2026 22:05
@jdconrad jdconrad merged commit f5f634d into elastic:main Mar 26, 2026
36 checks passed
jdconrad added a commit to jdconrad/elasticsearch that referenced this pull request Mar 26, 2026
…dex (elastic#145035)

Currently, when adding a follower index to a leader 
index using CCR, transport version is not copied which 
leads to errors in the upgrade assistant.
jdconrad added a commit to jdconrad/elasticsearch that referenced this pull request Mar 26, 2026
…dex (elastic#145035)

Currently, when adding a follower index to a leader 
index using CCR, transport version is not copied which 
leads to errors in the upgrade assistant.
jdconrad added a commit to jdconrad/elasticsearch that referenced this pull request Mar 26, 2026
…dex (elastic#145035)

Currently, when adding a follower index to a leader 
index using CCR, transport version is not copied which 
leads to errors in the upgrade assistant.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.3
8.19
9.2

elasticsearchmachine pushed a commit that referenced this pull request Mar 26, 2026
…dex (#145035) (#145041)

Currently, when adding a follower index to a leader 
index using CCR, transport version is not copied which 
leads to errors in the upgrade assistant.
elasticsearchmachine pushed a commit that referenced this pull request Mar 26, 2026
…dex (#145035) (#145040)

Currently, when adding a follower index to a leader 
index using CCR, transport version is not copied which 
leads to errors in the upgrade assistant.
elasticsearchmachine pushed a commit that referenced this pull request Mar 26, 2026
…dex (#145035) (#145039)

Currently, when adding a follower index to a leader 
index using CCR, transport version is not copied which 
leads to errors in the upgrade assistant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :Distributed/CCR Issues around the Cross Cluster State Replication features Team:Distributed Meta label for distributed team. v8.19.14 v9.2.8 v9.3.3 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants