15
15
import org .elasticsearch .cluster .block .ClusterBlockException ;
16
16
import org .elasticsearch .cluster .block .ClusterBlockLevel ;
17
17
import org .elasticsearch .cluster .metadata .IndexMetaData ;
18
+ import org .elasticsearch .cluster .routing .UnassignedInfo ;
18
19
import org .elasticsearch .cluster .metadata .IndexNameExpressionResolver ;
19
20
import org .elasticsearch .cluster .routing .allocation .decider .EnableAllocationDecider ;
21
+ import org .elasticsearch .cluster .routing .allocation .decider .MaxRetryAllocationDecider ;
20
22
import org .elasticsearch .cluster .routing .allocation .decider .ShardsLimitAllocationDecider ;
21
23
import org .elasticsearch .cluster .service .ClusterService ;
22
24
import org .elasticsearch .common .inject .Inject ;
28
30
import org .elasticsearch .index .IndexNotFoundException ;
29
31
import org .elasticsearch .index .IndexSettings ;
30
32
import org .elasticsearch .index .IndexingSlowLog ;
33
+ import org .elasticsearch .index .MergePolicyConfig ;
34
+ import org .elasticsearch .index .MergeSchedulerConfig ;
31
35
import org .elasticsearch .index .SearchSlowLog ;
32
36
import org .elasticsearch .index .cache .bitset .BitsetFilterCache ;
37
+ import org .elasticsearch .index .engine .EngineConfig ;
33
38
import org .elasticsearch .index .mapper .MapperService ;
34
39
import org .elasticsearch .index .shard .ShardId ;
35
40
import org .elasticsearch .indices .IndicesRequestCache ;
@@ -334,21 +339,37 @@ static String[] extractLeaderShardHistoryUUIDs(Map<String, String> ccrIndexMetaD
334
339
return historyUUIDs .split ("," );
335
340
}
336
341
337
- private static final Set <Setting <?>> WHITE_LISTED_SETTINGS ;
342
+ /**
343
+ * These are settings that are not replicated to the follower index and
344
+ * therefor these settings are not validated whether they have the same
345
+ * value between leader and follower index.
346
+ *
347
+ * These dynamic settings don't affect how documents are indexed (affect index time text analysis) and / or
348
+ * are inconvenient if they were replicated (e.g. changing number of replicas).
349
+ */
350
+ static final Set <Setting <?>> WHITE_LISTED_SETTINGS ;
338
351
339
352
static {
340
353
final Set <Setting <?>> whiteListedSettings = new HashSet <>();
341
354
whiteListedSettings .add (IndexMetaData .INDEX_NUMBER_OF_REPLICAS_SETTING );
342
355
whiteListedSettings .add (IndexMetaData .INDEX_AUTO_EXPAND_REPLICAS_SETTING );
343
-
344
356
whiteListedSettings .add (IndexMetaData .INDEX_ROUTING_EXCLUDE_GROUP_SETTING );
345
357
whiteListedSettings .add (IndexMetaData .INDEX_ROUTING_INCLUDE_GROUP_SETTING );
346
358
whiteListedSettings .add (IndexMetaData .INDEX_ROUTING_REQUIRE_GROUP_SETTING );
359
+ whiteListedSettings .add (IndexMetaData .INDEX_READ_ONLY_SETTING );
360
+ whiteListedSettings .add (IndexMetaData .INDEX_BLOCKS_READ_SETTING );
361
+ whiteListedSettings .add (IndexMetaData .INDEX_BLOCKS_WRITE_SETTING );
362
+ whiteListedSettings .add (IndexMetaData .INDEX_BLOCKS_METADATA_SETTING );
363
+ whiteListedSettings .add (IndexMetaData .INDEX_BLOCKS_READ_ONLY_ALLOW_DELETE_SETTING );
364
+ whiteListedSettings .add (IndexMetaData .INDEX_PRIORITY_SETTING );
365
+ whiteListedSettings .add (IndexMetaData .SETTING_WAIT_FOR_ACTIVE_SHARDS );
366
+
347
367
whiteListedSettings .add (EnableAllocationDecider .INDEX_ROUTING_REBALANCE_ENABLE_SETTING );
348
368
whiteListedSettings .add (EnableAllocationDecider .INDEX_ROUTING_ALLOCATION_ENABLE_SETTING );
349
369
whiteListedSettings .add (ShardsLimitAllocationDecider .INDEX_TOTAL_SHARDS_PER_NODE_SETTING );
370
+ whiteListedSettings .add (MaxRetryAllocationDecider .SETTING_ALLOCATION_MAX_RETRY );
371
+ whiteListedSettings .add (UnassignedInfo .INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING );
350
372
351
- whiteListedSettings .add (IndicesRequestCache .INDEX_CACHE_REQUEST_ENABLED_SETTING );
352
373
whiteListedSettings .add (IndexSettings .MAX_RESULT_WINDOW_SETTING );
353
374
whiteListedSettings .add (IndexSettings .INDEX_WARMER_ENABLED_SETTING );
354
375
whiteListedSettings .add (IndexSettings .INDEX_REFRESH_INTERVAL_SETTING );
@@ -359,6 +380,26 @@ static String[] extractLeaderShardHistoryUUIDs(Map<String, String> ccrIndexMetaD
359
380
whiteListedSettings .add (IndexSettings .QUERY_STRING_ANALYZE_WILDCARD );
360
381
whiteListedSettings .add (IndexSettings .QUERY_STRING_ALLOW_LEADING_WILDCARD );
361
382
whiteListedSettings .add (IndexSettings .ALLOW_UNMAPPED );
383
+ whiteListedSettings .add (IndexSettings .INDEX_SOFT_DELETES_RETENTION_OPERATIONS_SETTING );
384
+ whiteListedSettings .add (IndexSettings .MAX_SCRIPT_FIELDS_SETTING );
385
+ whiteListedSettings .add (IndexSettings .MAX_REGEX_LENGTH_SETTING );
386
+ whiteListedSettings .add (IndexSettings .MAX_TERMS_COUNT_SETTING );
387
+ whiteListedSettings .add (IndexSettings .MAX_ANALYZED_OFFSET_SETTING );
388
+ whiteListedSettings .add (IndexSettings .MAX_DOCVALUE_FIELDS_SEARCH_SETTING );
389
+ whiteListedSettings .add (IndexSettings .MAX_SLICES_PER_SCROLL );
390
+ whiteListedSettings .add (IndexSettings .MAX_ADJACENCY_MATRIX_FILTERS_SETTING );
391
+ whiteListedSettings .add (IndexSettings .DEFAULT_PIPELINE );
392
+ whiteListedSettings .add (IndexSettings .INDEX_SEARCH_THROTTLED );
393
+ whiteListedSettings .add (IndexSettings .INDEX_TRANSLOG_RETENTION_AGE_SETTING );
394
+ whiteListedSettings .add (IndexSettings .INDEX_TRANSLOG_RETENTION_SIZE_SETTING );
395
+ whiteListedSettings .add (IndexSettings .INDEX_TRANSLOG_GENERATION_THRESHOLD_SIZE_SETTING );
396
+ whiteListedSettings .add (IndexSettings .INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING );
397
+ whiteListedSettings .add (IndexSettings .INDEX_TRANSLOG_DURABILITY_SETTING );
398
+ whiteListedSettings .add (IndexSettings .INDEX_GC_DELETES_SETTING );
399
+ whiteListedSettings .add (IndexSettings .INDEX_TTL_DISABLE_PURGE_SETTING );
400
+ whiteListedSettings .add (IndexSettings .MAX_REFRESH_LISTENERS_PER_SHARD );
401
+
402
+ whiteListedSettings .add (IndicesRequestCache .INDEX_CACHE_REQUEST_ENABLED_SETTING );
362
403
whiteListedSettings .add (BitsetFilterCache .INDEX_LOAD_RANDOM_ACCESS_FILTERS_EAGERLY_SETTING );
363
404
364
405
whiteListedSettings .add (SearchSlowLog .INDEX_SEARCH_SLOWLOG_THRESHOLD_FETCH_DEBUG_SETTING );
@@ -378,7 +419,20 @@ static String[] extractLeaderShardHistoryUUIDs(Map<String, String> ccrIndexMetaD
378
419
whiteListedSettings .add (IndexingSlowLog .INDEX_INDEXING_SLOWLOG_REFORMAT_SETTING );
379
420
whiteListedSettings .add (IndexingSlowLog .INDEX_INDEXING_SLOWLOG_MAX_SOURCE_CHARS_TO_LOG_SETTING );
380
421
381
- whiteListedSettings .add (IndexSettings .INDEX_SOFT_DELETES_RETENTION_OPERATIONS_SETTING );
422
+ whiteListedSettings .add (MergePolicyConfig .INDEX_COMPOUND_FORMAT_SETTING );
423
+ whiteListedSettings .add (MergePolicyConfig .INDEX_MERGE_POLICY_MAX_MERGE_AT_ONCE_SETTING );
424
+ whiteListedSettings .add (MergePolicyConfig .INDEX_MERGE_POLICY_SEGMENTS_PER_TIER_SETTING );
425
+ whiteListedSettings .add (MergePolicyConfig .INDEX_MERGE_POLICY_DELETES_PCT_ALLOWED_SETTING );
426
+ whiteListedSettings .add (MergePolicyConfig .INDEX_MERGE_POLICY_EXPUNGE_DELETES_ALLOWED_SETTING );
427
+ whiteListedSettings .add (MergePolicyConfig .INDEX_MERGE_POLICY_FLOOR_SEGMENT_SETTING );
428
+ whiteListedSettings .add (MergePolicyConfig .INDEX_MERGE_POLICY_MAX_MERGE_AT_ONCE_EXPLICIT_SETTING );
429
+ whiteListedSettings .add (MergePolicyConfig .INDEX_MERGE_POLICY_MAX_MERGED_SEGMENT_SETTING );
430
+ whiteListedSettings .add (MergePolicyConfig .INDEX_MERGE_POLICY_RECLAIM_DELETES_WEIGHT_SETTING );
431
+
432
+ whiteListedSettings .add (MergeSchedulerConfig .AUTO_THROTTLE_SETTING );
433
+ whiteListedSettings .add (MergeSchedulerConfig .MAX_MERGE_COUNT_SETTING );
434
+ whiteListedSettings .add (MergeSchedulerConfig .MAX_THREAD_COUNT_SETTING );
435
+ whiteListedSettings .add (EngineConfig .INDEX_CODEC_SETTING );
382
436
383
437
WHITE_LISTED_SETTINGS = Collections .unmodifiableSet (whiteListedSettings );
384
438
}
0 commit comments