-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Move the failure store enable flag into the data stream options #113176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move the failure store enable flag into the data stream options #113176
Conversation
|
@elasticmachine update branch |
|
@elasticmachine update branch |
| @Nullable | ||
| public DataStreamFailureStore getFailureStore() { | ||
| return failureStore; | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant method since the DataStreamOptions is a record.
|
Pinging @elastic/es-data-management (Team:Data Management) |
| @Nullable | ||
| private final DataStreamLifecycle lifecycle; | ||
| private final boolean failureStoreEnabled; | ||
| private final DataStreamOptions dataStreamOptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it would be easier to refer to an empty constant than always perform the null check before accessing this object. Only on serialisation we use null to avoid serialising empty configurations.
jbaiera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really great! I only had a couple comments but otherwise LGTM!
server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java
Outdated
Show resolved
Hide resolved
...s/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceTests.java
Outdated
Show resolved
Hide resolved
|
@elasticmachine update branch |
|
@elasticmachine update branch |
💚 Backport successful
|
As the data stream start having built-in features, for example the data stream lifecycle and in the future the failure store, we would like to group these features under one unified entity.
This entity is going to be the data stream options and the first attempt to move some configuration there has already been implemented, see #109515.
In this PR we refactor the data stream code to use the data stream options instead of a single boolean to enabled the failure store.
The benefit of this are:
Implementation notes:
Currently the record
DataStreamOptionscontains onlyDataStreamFailureStore, and theFailureStoreOptionscontains only theenabledflag.Even though the
enabledflag is nullable and in the future it will possible to configureDataStreamFailureStorewithout setting this flag, currently this is not available because then we would have an emptyDataStreamFailureStoreobject.