Skip to content

Commit ac960bf

Browse files
authored
[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 6afb661 commit ac960bf

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
@@ -635,11 +635,7 @@ public UnaryOperator<Map<String, IndexTemplateMetaData>> getIndexTemplateMetaDat
635635
// TODO review these settings
636636
.settings(Settings.builder()
637637
.put(IndexMetaData.SETTING_AUTO_EXPAND_REPLICAS, "0-1")
638-
.put(UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), delayedNodeTimeOutSetting)
639-
// Sacrifice durability for performance: in the event of power
640-
// failure we can lose the last 5 seconds of changes, but it's
641-
// much faster
642-
.put(IndexSettings.INDEX_TRANSLOG_DURABILITY_SETTING.getKey(), "async"))
638+
.put(UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), delayedNodeTimeOutSetting))
643639
.putMapping(ElasticsearchMappings.DOC_TYPE, Strings.toString(stateMapping))
644640
.version(Version.CURRENT.id)
645641
.build();

0 commit comments

Comments
 (0)