Skip to content

Commit 28afa2f

Browse files
committed
Update JavaDoc
1 parent 2e64e34 commit 28afa2f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

modules/data-streams/src/main/java/org/elasticsearch/datastreams/DataStreamIndexSettingsProvider.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,15 @@ public void provideAdditionalSettings(
154154
}
155155

156156
/**
157-
* This is called when mappings are updated, so that the {@link IndexMetadata#getTimeSeriesDimensions()}
158-
* and {@link IndexMetadata#INDEX_ROUTING_PATH} settings are updated to match the new mappings.
159-
* Updates {@link IndexMetadata#getTimeSeriesDimensions} if a new dimension field is added to the mappings,
160-
* or sets {@link IndexMetadata#INDEX_ROUTING_PATH} if a new dimension field is added that doesn't allow for matching all
161-
* dimension fields via a wildcard pattern.
157+
* This is called when mappings are updated, so that the {@link IndexMetadata#INDEX_DIMENSIONS}
158+
* setting is updated if a new dimension field is added to the mappings.
159+
*
160+
* @throws IllegalArgumentException If a dynamic template that defines dimension fields is added to an existing index with
161+
* {@link IndexMetadata#getTimeSeriesDimensions()}.
162+
* Changing fom {@link IndexMetadata#INDEX_DIMENSIONS} to {@link IndexMetadata#INDEX_ROUTING_PATH}
163+
* is not allowed because it would violate the invariant that the same input document always results
164+
* in the same _id and _tsid.
165+
* Otherwise, data duplication or translog replay issues could occur.
162166
*/
163167
@Override
164168
public void onUpdateMappings(IndexMetadata indexMetadata, DocumentMapper documentMapper, Settings.Builder additionalSettings) {

0 commit comments

Comments
 (0)