Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.elasticsearch.action.datastreams.lifecycle.GetDataStreamLifecycleAction;
import org.elasticsearch.action.datastreams.lifecycle.PutDataStreamLifecycleAction;
import org.elasticsearch.client.internal.OriginSettingClient;
import org.elasticsearch.cluster.metadata.DataStream;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
Expand Down Expand Up @@ -283,10 +282,8 @@ public List<RestHandler> getRestHandlers(
handlers.add(new RestGetDataStreamOptionsAction());
handlers.add(new RestPutDataStreamOptionsAction());
handlers.add(new RestDeleteDataStreamOptionsAction());
if (DataStream.LOGS_STREAM_FEATURE_FLAG) {
handlers.add(new RestGetDataStreamSettingsAction());
handlers.add(new RestUpdateDataStreamSettingsAction());
}
handlers.add(new RestGetDataStreamSettingsAction());
handlers.add(new RestUpdateDataStreamSettingsAction());
return handlers;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"description":"Gets a data stream's settings"
},
"stability":"stable",
"visibility": "feature_flag",
"feature_flag": "logs_stream",
"visibility": "public",
"headers":{
"accept": [ "application/json"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"description":"Updates a data stream's settings"
},
"stability":"stable",
"visibility": "feature_flag",
"feature_flag": "logs_stream",
"visibility": "public",
"headers":{
"accept": [ "application/json"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,9 @@ public XContentBuilder toXContent(
builder.endArray();
builder.endObject();
}
if (DataStream.LOGS_STREAM_FEATURE_FLAG) {
builder.startObject(SETTINGS_FIELD.getPreferredName());
dataStream.getSettings().toXContent(builder, params);
builder.endObject();
}
builder.startObject(SETTINGS_FIELD.getPreferredName());
dataStream.getSettings().toXContent(builder, params);
builder.endObject();

builder.startObject(DataStream.FAILURE_STORE_FIELD.getPreferredName());
builder.field(FAILURE_STORE_ENABLED.getPreferredName(), failureStoreEffectivelyEnabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.time.DateFormatter;
import org.elasticsearch.common.time.DateFormatters;
import org.elasticsearch.common.util.FeatureFlag;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.core.FixForMultiProject;
import org.elasticsearch.core.Nullable;
Expand Down Expand Up @@ -80,7 +79,6 @@ public final class DataStream implements SimpleDiffable<DataStream>, ToXContentO
private static final Logger LOGGER = LogManager.getLogger(DataStream.class);

public static final NodeFeature DATA_STREAM_FAILURE_STORE_FEATURE = new NodeFeature("data_stream.failure_store");
public static final boolean LOGS_STREAM_FEATURE_FLAG = new FeatureFlag("logs_stream").isEnabled();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep this in to use with the mappings stuff and the enable/disable API that Luke is working on?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

public static final TransportVersion ADDED_FAILURE_STORE_TRANSPORT_VERSION = TransportVersions.V_8_12_0;
public static final TransportVersion ADDED_AUTO_SHARDING_EVENT_VERSION = TransportVersions.V_8_14_0;
public static final TransportVersion ADD_DATA_STREAM_OPTIONS_VERSION = TransportVersions.V_8_16_0;
Expand Down