Skip to content
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

Stop using feature flag FEED_SEQUENCER_TYPE #33230

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -75,7 +75,7 @@ public interface ModelContext {
*/
interface FeatureFlags {
@ModelFeatureFlag(owners = {"baldersheim"}, comment = "Revisit in May or June 2024") default double defaultTermwiseLimit() { throw new UnsupportedOperationException("TODO specify default value"); }
@ModelFeatureFlag(owners = {"baldersheim"}, comment = "Select sequencer type use while feeding") default String feedSequencerType() { return "THROUGHPUT"; }
@ModelFeatureFlag(owners = {"baldersheim"}, removeAfter = "8.473") default String feedSequencerType() { return "THROUGHPUT"; }
@ModelFeatureFlag(owners = {"baldersheim"}) default String responseSequencerType() { throw new UnsupportedOperationException("TODO specify default value"); }
@ModelFeatureFlag(owners = {"hmusum"}, removeAfter = "8.473") default String queryDispatchPolicy() { return "adaptive"; }
@ModelFeatureFlag(owners = {"baldersheim"}) default double queryDispatchWarmup() { return 5.0; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
private double defaultTermwiseLimit = 1.0;
private String jvmGCOptions = null;
private String summaryDecodePolicy = "eager";
private String sequencerType = "THROUGHPUT";
private boolean firstTimeDeployment = false;
private String responseSequencerType = "ADAPTIVE";
private int responseNumThreads = 2;
Expand Down Expand Up @@ -99,7 +98,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
@Override public Zone zone() { return zone; }
@Override public Set<ContainerEndpoint> endpoints() { return endpoints; }
@Override public String jvmGCOptions(Optional<ClusterSpec.Type> clusterType) { return jvmGCOptions; }
@Override public String feedSequencerType() { return sequencerType; }
@Override public boolean isBootstrap() { return false; }
@Override public boolean isFirstTimeDeployment() { return firstTimeDeployment; }
@Override public boolean useDedicatedNodeForLogserver() { return useDedicatedNodeForLogserver; }
Expand Down Expand Up @@ -200,10 +198,7 @@ public TestProperties setSummaryDecodePolicy(String type) {
summaryDecodePolicy = type;
return this;
}
public TestProperties setFeedSequencerType(String type) {
sequencerType = type;
return this;
}

public TestProperties setResponseSequencerType(String type) {
responseSequencerType = type;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public class ContentSearchCluster extends TreeConfigProducer<AnyConfigProducer>

private final Map<StorageGroup, NodeSpec> groupToSpecMap = new LinkedHashMap<>();
private ResourceLimits resourceLimits;
private final ProtonConfig.Indexing.Optimize.Enum feedSequencerType;
private final double defaultFeedConcurrency;
private final double defaultFeedNiceness;
private final boolean forwardIssuesToQrs;
Expand Down Expand Up @@ -129,14 +128,6 @@ private void buildSearchCluster(DeployState deployState, ModelElement clusterEle
}
}

private static ProtonConfig.Indexing.Optimize.Enum convertFeedSequencerType(String sequencerType) {
try {
return ProtonConfig.Indexing.Optimize.Enum.valueOf(sequencerType);
} catch (Throwable t) {
return ProtonConfig.Indexing.Optimize.Enum.LATENCY;
}
}

private ContentSearchCluster(TreeConfigProducer<?> parent,
String clusterName,
ModelContext.FeatureFlags featureFlags,
Expand All @@ -155,7 +146,6 @@ private ContentSearchCluster(TreeConfigProducer<?> parent,
this.syncTransactionLog = syncTransactionLog;

this.fractionOfMemoryReserved = fractionOfMemoryReserved;
this.feedSequencerType = convertFeedSequencerType(featureFlags.feedSequencerType());
this.defaultFeedConcurrency = featureFlags.feedConcurrency();
this.defaultFeedNiceness = featureFlags.feedNiceness();
this.forwardIssuesToQrs = featureFlags.forwardIssuesAsErrors();
Expand Down Expand Up @@ -358,7 +348,6 @@ public void getConfig(ProtonConfig.Builder builder) {
redundancy.getConfig(builder);
}

builder.indexing.optimize(feedSequencerType);
setMaxFlushed(builder);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -770,28 +770,6 @@ private ProtonConfig resolveProtonConfig(TestProperties props, String hostedXml)
return getProtonConfig(model.getContentClusters().values().iterator().next());
}

private void verifyFeedSequencer(String input, String expected) {
verifyFeedSequencer(input, expected, 0);
}

private void verifyFeedSequencer(String input, String expected, double visibilityDelay) {
String hostedXml = xmlWithVisibilityDelay(visibilityDelay);
var config = resolveProtonConfig(new TestProperties().setFeedSequencerType(input), hostedXml);
assertEquals(expected, config.indexing().optimize().toString());
}

@Test
void ensureFeedSequencerIsControlledByFlag() {
verifyFeedSequencer("LATENCY", "LATENCY");
verifyFeedSequencer("ADAPTIVE", "ADAPTIVE");
verifyFeedSequencer("THROUGHPUT", "THROUGHPUT", 0);
verifyFeedSequencer("THROUGHPUT", "THROUGHPUT", 0.1);

verifyFeedSequencer("THOUGHPUT", "LATENCY");
verifyFeedSequencer("adaptive", "LATENCY");

}

private void verifyThatFeatureFlagControlsVisibilityDelayDefault(Double xmlOverride, double expected) {
String hostedXml = xmlWithVisibilityDelay(xmlOverride);
var config = resolveProtonConfig(new TestProperties(), hostedXml);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ public static class FeatureFlags implements ModelContext.FeatureFlags {

private final double queryDispatchWarmup;
private final double defaultTermwiseLimit;
private final String feedSequencer;
private final String responseSequencer;
private final int numResponseThreads;
private final boolean useAsyncMessageHandlingOnSchedule;
Expand Down Expand Up @@ -218,7 +217,6 @@ public static class FeatureFlags implements ModelContext.FeatureFlags {

public FeatureFlags(FlagSource source, ApplicationId appId, Version version) {
this.defaultTermwiseLimit = Flags.DEFAULT_TERM_WISE_LIMIT.bindTo(source).with(appId).with(version).value();
this.feedSequencer = Flags.FEED_SEQUENCER_TYPE.bindTo(source).with(appId).with(version).value();
this.responseSequencer = Flags.RESPONSE_SEQUENCER_TYPE.bindTo(source).with(appId).with(version).value();
this.numResponseThreads = Flags.RESPONSE_NUM_THREADS.bindTo(source).with(appId).with(version).value();
this.useAsyncMessageHandlingOnSchedule = Flags.USE_ASYNC_MESSAGE_HANDLING_ON_SCHEDULE.bindTo(source).with(appId).with(version).value();
Expand Down Expand Up @@ -273,7 +271,6 @@ public FeatureFlags(FlagSource source, ApplicationId appId, Version version) {
@Override public double queryDispatchWarmup() { return queryDispatchWarmup; }
@Override public String summaryDecodePolicy() { return summaryDecodePolicy; }
@Override public double defaultTermwiseLimit() { return defaultTermwiseLimit; }
@Override public String feedSequencerType() { return feedSequencer; }
@Override public String responseSequencerType() { return responseSequencer; }
@Override public int defaultNumResponseThreads() { return numResponseThreads; }
@Override public boolean useAsyncMessageHandlingOnSchedule() { return useAsyncMessageHandlingOnSchedule; }
Expand Down
7 changes: 0 additions & 7 deletions flags/src/main/java/com/yahoo/vespa/flags/Flags.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ public class Flags {
"Takes effect at redeployment (requires restart)",
INSTANCE_ID);

public static final UnboundStringFlag FEED_SEQUENCER_TYPE = defineStringFlag(
"feed-sequencer-type", "THROUGHPUT",
List.of("baldersheim"), "2020-12-02", "2025-03-01",
"Selects type of sequenced executor used for feeding in proton, valid values are LATENCY, ADAPTIVE, THROUGHPUT",
"Takes effect at redeployment (requires restart)",
INSTANCE_ID);

public static final UnboundIntFlag MAX_UNCOMMITTED_MEMORY = defineIntFlag(
"max-uncommitted-memory", 130000,
List.of("geirst"), "2021-10-21", "2025-03-01",
Expand Down