Skip to content

Commit

Permalink
Merge pull request #33350 from vespa-engine/hmusum/move-flag-to-Perma…
Browse files Browse the repository at this point in the history
…nentFlags-6

Move SORT_BLUEPRINTS_BY_COST to PermanentFlags
  • Loading branch information
hmusum authored Feb 19, 2025
2 parents 47a9e40 + 2cf0b85 commit fe94f89
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ interface FeatureFlags {
@ModelFeatureFlag(owners = {"hmusum"}) default String unknownConfigDefinition() { return "warn"; }
@ModelFeatureFlag(owners = {"hmusum"}) default int searchHandlerThreadpool() { return 2; }
@ModelFeatureFlag(owners = {"baldersheim"}) default boolean alwaysMarkPhraseExpensive() { return false; }
@ModelFeatureFlag(owners = {"baldersheim"}) default boolean sortBlueprintsByCost() { return false; }
@ModelFeatureFlag(owners = {"havardpe"}) default boolean sortBlueprintsByCost() { return false; }
@ModelFeatureFlag(owners = {"vekterli"}) default int persistenceThreadMaxFeedOpBatchSize() { return 1; }
@ModelFeatureFlag(owners = {"olaa"}) default boolean logserverOtelCol() { return false; }
@ModelFeatureFlag(owners = {"bratseth"}) default SharedHosts sharedHosts() { return SharedHosts.empty(); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public FeatureFlags(FlagSource source, ApplicationId appId, Version version) {
this.unknownConfigDefinition = PermanentFlags.UNKNOWN_CONFIG_DEFINITION.bindTo(source).with(appId).with(version).value();
this.searchHandlerThreadpool = Flags.SEARCH_HANDLER_THREADPOOL.bindTo(source).with(appId).with(version).value();
this.alwaysMarkPhraseExpensive = Flags.ALWAYS_MARK_PHRASE_EXPENSIVE.bindTo(source).with(appId).with(version).value();
this.sortBlueprintsByCost = Flags.SORT_BLUEPRINTS_BY_COST.bindTo(source).with(appId).with(version).value();
this.sortBlueprintsByCost = PermanentFlags.SORT_BLUEPRINTS_BY_COST.bindTo(source).with(appId).with(version).value();
this.persistenceThreadMaxFeedOpBatchSize = Flags.PERSISTENCE_THREAD_MAX_FEED_OP_BATCH_SIZE.bindTo(source).with(appId).with(version).value();
this.logserverOtelCol = Flags.LOGSERVER_OTELCOL_AGENT.bindTo(source).with(appId).with(version).value();
this.sharedHosts = PermanentFlags.SHARED_HOST.bindTo(source).with(appId).with(version).value();
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 @@ -214,13 +214,6 @@ public class Flags {
"Where specified, CNAME records are used instead of the default ALIAS records, which have a default 60s TTL.",
"Takes effect at redeployment from controller");

public static final UnboundBooleanFlag SORT_BLUEPRINTS_BY_COST = defineFeatureFlag(
"sort-blueprints-by-cost", false,
List.of("havardpe"), "2023-12-19", "2025-04-01",
"If true blueprints are sorted based on cost estimate, rather than absolute estimated hits",
"Takes effect at redeployment",
INSTANCE_ID);

public static final UnboundBooleanFlag ALWAYS_MARK_PHRASE_EXPENSIVE = defineFeatureFlag(
"always-mark-phrase-expensive", false,
List.of("havardpe"), "2023-11-20", "2025-04-01",
Expand Down
6 changes: 6 additions & 0 deletions flags/src/main/java/com/yahoo/vespa/flags/PermanentFlags.java
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,12 @@ public class PermanentFlags {
"Takes effect at redeployment",
INSTANCE_ID);

public static final UnboundBooleanFlag SORT_BLUEPRINTS_BY_COST = defineFeatureFlag(
"sort-blueprints-by-cost", false,
"If true blueprints are sorted based on cost estimate, rather than absolute estimated hits",
"Takes effect at redeployment",
INSTANCE_ID);

private PermanentFlags() {}

private static UnboundBooleanFlag defineFeatureFlag(
Expand Down

0 comments on commit fe94f89

Please sign in to comment.