Skip to content

Commit

Permalink
Merge branch 'main' into handle-transform-reindex-failures
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Dec 11, 2024
2 parents b2691af + a8a4a7b commit f5daed2
Show file tree
Hide file tree
Showing 50 changed files with 3,935 additions and 980 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,20 @@ private List<Version> getReleased() {
.toList();
}

public List<Version> getReadOnlyIndexCompatible() {
// Lucene can read indices in version N-2
int compatibleMajor = currentVersion.getMajor() - 2;
return versions.stream().filter(v -> v.getMajor() == compatibleMajor).sorted(Comparator.naturalOrder()).toList();
}

public void withLatestReadOnlyIndexCompatible(Consumer<Version> versionAction) {
var compatibleVersions = getReadOnlyIndexCompatible();
if (compatibleVersions == null || compatibleVersions.isEmpty()) {
throw new IllegalStateException("No read-only compatible version found.");
}
versionAction.accept(compatibleVersions.getLast());
}

/**
* Return versions of Elasticsearch which are index compatible with the current version.
*/
Expand Down
17 changes: 17 additions & 0 deletions docs/changelog/117583.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pr: 117583
summary: Removing index alias creation for deprecated transforms notification index
area: Machine Learning
type: deprecation
issues: []
deprecation:
title: Removing index alias creation for deprecated transforms notification index
area: Transform
details: >-
As part of the migration from 7.x to 8.x, the `.data-frame-notifications-1` index
was deprecated and replaced with the `.transform-notifications-000002` index.
The index is no longer created by default, all writes are directed to the new index,
and any clusters with the deprecated index will have an alias created to ensure that
reads are still retrieving data that was written to the index before the migration to 8.x.
This change removes the alias from the deprecated index in 9.x. Any clusters with the alias present
will retain it, but it will not be created on new clusters.
impact: No known end user impact.
Loading

0 comments on commit f5daed2

Please sign in to comment.