File tree 2 files changed +3
-1
lines changed
server/src/main/java/org/elasticsearch 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,8 @@ public void process(IndexRequest indexRequest) {
167
167
// generate id if not already provided
168
168
final String id = indexRequest .id ();
169
169
if (id == null ) {
170
- if (creationVersion .onOrAfter (IndexVersions .TIME_BASED_K_ORDERED_DOC_ID ) && indexMode == IndexMode .LOGSDB ) {
170
+ if (creationVersion .between (IndexVersions .TIME_BASED_K_ORDERED_DOC_ID_BACKPORT , IndexVersions .UPGRADE_TO_LUCENE_10_0_0 )
171
+ || creationVersion .onOrAfter (IndexVersions .TIME_BASED_K_ORDERED_DOC_ID ) && indexMode == IndexMode .LOGSDB ) {
171
172
indexRequest .autoGenerateTimeBasedId ();
172
173
} else {
173
174
indexRequest .autoGenerateId ();
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ private static Version parseUnchecked(String version) {
130
130
public static final IndexVersion ENABLE_IGNORE_ABOVE_LOGSDB = def (8_517_00_0 , Version .LUCENE_9_12_0 );
131
131
public static final IndexVersion ADD_ROLE_MAPPING_CLEANUP_MIGRATION = def (8_518_00_0 , Version .LUCENE_9_12_0 );
132
132
public static final IndexVersion LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT_BACKPORT = def (8_519_00_0 , Version .LUCENE_9_12_0 );
133
+ public static final IndexVersion TIME_BASED_K_ORDERED_DOC_ID_BACKPORT = def (8_520_00_0 , Version .LUCENE_9_12_0 );
133
134
public static final IndexVersion UPGRADE_TO_LUCENE_10_0_0 = def (9_000_00_0 , Version .LUCENE_10_0_0 );
134
135
public static final IndexVersion LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT = def (9_001_00_0 , Version .LUCENE_10_0_0 );
135
136
public static final IndexVersion TIME_BASED_K_ORDERED_DOC_ID = def (9_002_00_0 , Version .LUCENE_10_0_0 );
You can’t perform that action at this time.
0 commit comments