Skip to content

Commit f8c812e

Browse files
committed
[ML] Use default request durability for .ml-state index (#32233)
The initial decision to use async durability was made a long time ago for performance reasons. That argument no longer applies and we prefer the safety of request durability.
1 parent 1d8dd10 commit f8c812e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearning.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,7 @@ public UnaryOperator<Map<String, IndexTemplateMetaData>> getIndexTemplateMetaDat
640640
// TODO review these settings
641641
.settings(Settings.builder()
642642
.put(IndexMetaData.SETTING_AUTO_EXPAND_REPLICAS, "0-1")
643-
.put(UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), delayedNodeTimeOutSetting)
644-
// Sacrifice durability for performance: in the event of power
645-
// failure we can lose the last 5 seconds of changes, but it's
646-
// much faster
647-
.put(IndexSettings.INDEX_TRANSLOG_DURABILITY_SETTING.getKey(), "async"))
643+
.put(UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), delayedNodeTimeOutSetting))
648644
.putMapping(ElasticsearchMappings.DOC_TYPE, Strings.toString(stateMapping))
649645
.version(Version.CURRENT.id)
650646
.build();

0 commit comments

Comments
 (0)