Skip to content

Commit

Permalink
Merge branch 'main' into esql-dls-opt-in-ccs-test
Browse files Browse the repository at this point in the history
  • Loading branch information
n1v0lg authored Dec 11, 2024
2 parents 11eb1c6 + 9837e78 commit 4db5330
Show file tree
Hide file tree
Showing 47 changed files with 4,127 additions and 1,452 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 4db5330

Please sign in to comment.