-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CCR] Retry when no index shard stats can be found #34852
[CCR] Retry when no index shard stats can be found #34852
Conversation
Index shard stats for the follower shard are fetched, when a shard follow task is started. This is needed in order to bootstap the shard follow task with the follower global checkpoint. Sometimes index shard stats are not available (e.g. during a restart) and we fail now, while it is very likely that these stats will be available some time later.
Pinging @elastic/es-distributed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -185,7 +185,7 @@ protected void nodeOperation(final AllocatedPersistentTask task, final ShardFoll | |||
return; | |||
} | |||
|
|||
if (ShardFollowNodeTask.shouldRetry(e)) { | |||
if (ShardFollowNodeTask.shouldRetry(e) || e instanceof IndexNotFoundException) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, actually, one comment; can you leave a comment here about this, since it's slightly different retry logic from elsewhere.
…dException if the index exists in local cluster state and a IndexNotFoundException if it no longer exists. This way we can complete rely on ShardFollowNodeTask.shouldRetry(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @martijnvg.
@elasticmachine run gradle build tests |
Index shard stats for the follower shard are fetched, when a shard follow task is started. This is needed in order to bootstap the shard follow task with the follower global checkpoint. Sometimes index shard stats are not available (e.g. during a restart) and we fail now, while it is very likely that these stats will be available some time later.
Index shard stats for the follower shard are fetched, when a shard follow task is started. This is needed in order to bootstap the shard follow task with the follower global checkpoint. Sometimes index shard stats are not available (e.g. during a restart) and we fail now, while it is very likely that these stats will be available some time later.
* 'master' of github.com:elastic/elasticsearch: Fix line length for org.elasticsearch.common.* files (elastic#34888) [ML] Extract common native process base class (elastic#34856) Refactor children aggregator into a generic ParentJoinAggregator (elastic#34845) [Style] Fix line lengths in action.admin.indices (elastic#34890) HLRC - add support for source exists API (elastic#34519) [CCR] Retry when no index shard stats can be found (elastic#34852) [Docs] audit logfile structured format (elastic#34584) [Test] Fix FullClusterRestartIT.testShrink() with copy_settings param (elastic#34853) Fix LineLength Check Suppressions: index.fielddata (elastic#34891) TEST: Stablize Minio Free Port Search (elastic#34894) Delete flaky SettingsBasedHostProviderIT test (elastic#34813) [ML] Include message in field_stats for text log files (elastic#34861) [TEST] HLRC: Expand failure messages in API checks (elastic#34838) Lowercase static final DeprecationLogger instance names (elastic#34887)
Index shard stats for the follower shard are fetched, when a shard follow task is started. This is needed in order to bootstap the shard follow task with the follower global checkpoint. Sometimes index shard stats are not available (e.g. during a restart) and we fail now, while it is very likely that these stats will be available some time later.
Index shard stats for the follower shard are fetched, when a shard follow task is started.
This is needed in order to bootstap the shard follow task with the follower global checkpoint.
Sometimes index shard stats are not available (e.g. during a restart) and
we fail now, while it is very likely that these stats will be available some time later.