Skip to content

Commit

Permalink
fix: synthetic recovery only for stateful
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatore-campagna committed Jan 10, 2025
1 parent 10d8b7d commit b05e061
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,9 @@ public Iterator<Setting<?>> settings() {
public static final Setting<Boolean> RECOVERY_USE_SYNTHETIC_SOURCE_SETTING = Setting.boolSetting(
"index.recovery.use_synthetic_source",
settings -> {
if (IndexMetadata.SETTING_INDEX_VERSION_CREATED.get(settings)
.onOrAfter(IndexVersions.USE_SYNTHETIC_SOURCE_FOR_RECOVERY_BY_DEFAULT)
if (DiscoveryNode.isStateless(settings) == false
&& IndexMetadata.SETTING_INDEX_VERSION_CREATED.get(settings)
.onOrAfter(IndexVersions.USE_SYNTHETIC_SOURCE_FOR_RECOVERY_BY_DEFAULT)
|| SETTING_INDEX_VERSION_CREATED.get(settings)
.between(IndexVersions.USE_SYNTHETIC_SOURCE_FOR_RECOVERY_BY_DEFAULT_BACKPORT, IndexVersions.UPGRADE_TO_LUCENE_10_0_0)) {
final SourceFieldMapper.Mode sourceMode = INDEX_MAPPER_SOURCE_MODE_SETTING.get(settings);
Expand Down

0 comments on commit b05e061

Please sign in to comment.